Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Sunil Kulkarni
Login page with virtual hosting for communities
20. September 2012 00:12
Antwort

Sunil Kulkarni

Rang: Junior Member

Nachrichten: 88

Eintrittsdatum: 24. Juni 2011

Neue Beiträge

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. September 2012 02:09
Antwort

Jignesh Vachhani

Rang: Liferay Master

Nachrichten: 780

Eintrittsdatum: 10. März 2008

Neue Beiträge

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. September 2012 01:48
Antwort

Sunil Kulkarni

Rang: Junior Member

Nachrichten: 88

Eintrittsdatum: 24. Juni 2011

Neue Beiträge

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. September 2012 23:44
Antwort

Zsolt Balogh

LIFERAY STAFF

Rang: Expert

Nachrichten: 459

Eintrittsdatum: 23. März 2009

Neue Beiträge

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. September 2012 00:38
Antwort

Tejas Kanani

Rang: Liferay Master

Nachrichten: 652

Eintrittsdatum: 6. Januar 2009

Neue Beiträge

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. Februar 2013 02:11
Antwort

Tejas patel

Rang: Junior Member

Nachrichten: 71

Eintrittsdatum: 23. Januar 2012

Neue Beiträge


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
Anhang

Anhänge: community1.png (114,5k)