论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
Sunil Kulkarni
Login page with virtual hosting for communities
2012年9月20日 上午12:12
答复

Sunil Kulkarni

等级: Junior Member

帖子: 94

加入日期: 2011年6月24日

最近的帖子

Hi,

I have created two different communities: community1 and community2
Also given the virtual host to both communities:
For community1:
Virtual Host for public pages : www.community1.com
Virtual Host for private pages : community1

For community2:
Virtual Host for public pages : www.community2.com
Virtual Host for private pages : community2

Added the entries in host file for above two hosts.

If I have entered www.community1.com in the URL I can see the public pages of community1 and same thing happened with www.community2.com.

What I want to achieve is when user entered www.community1.com, before showing the public pages of the community, I want to show the login page and when user logged into the system, he can see the community public page.

Kindly give suggestions for this.
Jignesh Vachhani
RE: Login page with virtual hosting for communities
2012年9月20日 上午2:09
答复

Jignesh Vachhani

等级: Liferay Master

帖子: 795

加入日期: 2008年3月10日

最近的帖子

Sunil

You can create your landing page as a public page and put login portlet on that landing page.
Now make all other portlet private page so that only logged in user can see those pages.
Hope you achieve your functionality by following above scenario.
If still you have any doubt, please post your comment here.
Sunil Kulkarni
RE: Login page with virtual hosting for communities
2012年9月21日 上午1:48
答复

Sunil Kulkarni

等级: Junior Member

帖子: 94

加入日期: 2011年6月24日

最近的帖子

Hi Jignesh,

I have added sign in portlet on community public page and added remaining portlets into community private page.

When user entered www.community1.com, he can see the login portlet. When he logged in , he can the pubic page of the community. Is there any setting available so that if the user is logged in and if he is the community member then he can directly see the private pages of the community.
Currently, user can see the public pages of the community.

Can we do this by doing any control panel setting or we need to write hook for this?
Zsolt Balogh
RE: Login page with virtual hosting for communities
2012年9月21日 下午11:44
答复

Zsolt Balogh

LIFERAY STAFF

等级: Expert

帖子: 463

加入日期: 2009年3月23日

最近的帖子

Hi Sunil,

I'm not sure if I understand the requirements. You want all of your users to be logged in before visiting the public pages? For this purpose we have the private pages created. If you add the www.community1.com virtualhost to the private pages and your users would need to log in before visiting.

Zsolt
Tejas Kanani
RE: Login page with virtual hosting for communities
2012年9月22日 上午12:38
答复

Tejas Kanani

等级: Liferay Master

帖子: 655

加入日期: 2009年1月6日

最近的帖子

Hi Sunil,

There is way to land user on specific private page you want from Control Panel --> Portal Settings --> General --> Navigation
But which doesn't provide flexibility to make it community/site specific different landing page. As if any user from Community2 logs in, it will redirect it on the same page which you set in Portal Settings --> General --> Navigation.

For that you can create Custom Landing Page hook which will redirect user to custom requirement based landing page.
You can visit my blog which includes similar requirement as yours.
Custom Landing page using hook - Liferay 6.1

Let me know if you have any doubt/question regarding the same.

Thanks,
Tejas
Tejas patel
RE: Login page with virtual hosting for communities
2013年2月20日 上午2:11
答复

Tejas patel

等级: Junior Member

帖子: 71

加入日期: 2012年1月23日

最近的帖子


HI I have face the same issue and what I do is let me give explanation step by step.

1) first I have created a new community called community1
2)now from control panel I define virtual host like public page-->www.community1.com, private page virtual host-->www.pri.community1.com and given friendly url as a "/community1".
3)create entry in host file for both domain.
4)create only one page in public page that is for login.
5)create require pages on private site so user can see it after login only.
6)now access the community using private virtual host (www.pri.community1.com) so it can ask for login first.
7)after successful login it redirects you on private pages.

So that's it, it solve my pyou can see it in given image (community1.png).
I think that you have same issue try above step may be you got solution of your question.

Regards,
Tejas patel
附件

附件: community1.png (114.5k)