Fórum

Login page with virtual hosting for communities

Sunil Kulkarni, modificado 11 Anos atrás.

Login page with virtual hosting for communities

Junior Member Postagens: 94 Data de Entrada: 24/06/11 Postagens Recentes
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.
thumbnail
Jignesh Vachhani, modificado 11 Anos atrás.

RE: Login page with virtual hosting for communities

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
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, modificado 11 Anos atrás.

RE: Login page with virtual hosting for communities

Junior Member Postagens: 94 Data de Entrada: 24/06/11 Postagens Recentes
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?
thumbnail
Zsolt Balogh, modificado 11 Anos atrás.

RE: Login page with virtual hosting for communities

Expert Postagens: 463 Data de Entrada: 23/03/09 Postagens Recentes
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
thumbnail
Tejas Kanani, modificado 11 Anos atrás.

RE: Login page with virtual hosting for communities

Liferay Master Postagens: 654 Data de Entrada: 06/01/09 Postagens Recentes
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
thumbnail
Tejas Patel, modificado 11 Anos atrás.

RE: Login page with virtual hosting for communities

Junior Member Postagens: 71 Data de Entrada: 24/01/12 Postagens Recentes

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