Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Sunil Kulkarni
Login page with virtual hosting for communities
20 de Setembro de 2012 00:12
Resposta

Sunil Kulkarni

Ranking: Junior Member

Mensagens: 94

Data de entrada: 24 de Junho de 2011

Mensagens 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.
Jignesh Vachhani
RE: Login page with virtual hosting for communities
20 de Setembro de 2012 02:09
Resposta

Jignesh Vachhani

Ranking: Liferay Master

Mensagens: 780

Data de entrada: 10 de Março de 2008

Mensagens 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
RE: Login page with virtual hosting for communities
21 de Setembro de 2012 01:48
Resposta

Sunil Kulkarni

Ranking: Junior Member

Mensagens: 94

Data de entrada: 24 de Junho de 2011

Mensagens 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?
Zsolt Balogh
RE: Login page with virtual hosting for communities
21 de Setembro de 2012 23:44
Resposta

Zsolt Balogh

LIFERAY STAFF

Ranking: Expert

Mensagens: 459

Data de entrada: 23 de Março de 2009

Mensagens 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
Tejas Kanani
RE: Login page with virtual hosting for communities
22 de Setembro de 2012 00:38
Resposta

Tejas Kanani

Ranking: Liferay Master

Mensagens: 653

Data de entrada: 6 de Janeiro de 2009

Mensagens 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
Tejas patel
RE: Login page with virtual hosting for communities
20 de Fevereiro de 2013 02:11
Resposta

Tejas patel

Ranking: Junior Member

Mensagens: 71

Data de entrada: 23 de Janeiro de 2012

Mensagens 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
Anexo

Anexos: community1.png (114,5k)