Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jason Gabler
Per User Landing Page?
March 18, 2009 3:36 PM
Answer

Jason Gabler

Rank: New Member

Posts: 6

Join Date: March 12, 2009

Recent Posts

I've read some posts about creating custom landing pages, but I do not believe I've seen anything that would allow me to cause a user, right after logging in, to land on his or her own private welcome page. To me this seems like quite a natural thing to have, so I've been searching the docs and application controls but have found nothing.

I figure if this is not possible in the application, a further modification of the custom landing pages suggestion would need to be done.

Any thoughts? Thanks,

jason
Jason Gabler
RE: Per User Landing Page?
March 18, 2009 4:06 PM
Answer

Jason Gabler

Rank: New Member

Posts: 6

Join Date: March 12, 2009

Recent Posts

Hrm, I just found this. Thought, I was hoping there was a configuration method (as opposed to a development method).

jason

p.s. So I tried the code at that link. To get it to compile I added every single jar in .../tomcat/common/lib/... and .../tomcat/webapps/ROOT/WEB-INF/lib because I did not feel like figuring it all out emoticon It works, but I find it unfortunate that this has to be a universal change, and can only be changed through further hacking.
Oliver Bayer
RE: Per User Landing Page?
March 19, 2009 3:49 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 878

Join Date: February 18, 2009

Recent Posts

Hi,

I'm not sure if I get you right: you want to redirect users after login to their private page?!? As I know you can set this behavior with the following line in the portal-ext.property file.
1auth.forward.by.last.path=false

Now the users are getting redirected to their private start page with the following url rule:
http://server-url:port/user/<username>/<page nr.1 name>
HTH
Hasnain Rasheed
RE: Per User Landing Page?
March 25, 2009 12:14 PM
Answer

Hasnain Rasheed

Rank: Junior Member

Posts: 26

Join Date: March 11, 2009

Recent Posts

Im using liferay 5.2, and Im really new to liferay, can you plz explain that all you did was to add a line to portel -ext.properties file??
also if I want to redirect the user after login to some other page, how can I do it?
plz explain in detail.
Oliver Bayer
RE: Per User Landing Page?
April 1, 2009 5:02 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 878

Join Date: February 18, 2009

Recent Posts

First of all sorry for the late reply.

1. If you want to redirect logged in users to their private page you have to set the "auth.forward.by.last.path" parameter in the portal-ext.properties to false as described in my last post. If this parameter stays default (=true) then the users are redirected to the last site they visited before the login action. This may be e.g. http://localhost:8080/web/guest/home.

2. If you want to redirect logged in users to another page you have to set the following in the portal-ext.properties too.
1auth.forward.by.last.path=true
2default.landing.page.path=/web/guest/login

The default.landing.page.path is the relative path of your portal-page to which you want to redirect.

The portal-ext.properties file must be put into the webserver include path so e.g. if you use tomcat you can put this file into the "webapps\ROOT\WEB-INF\classes" dir. After that you have to restart the webserver.

HTH Oli
Srinath A
RE: Per User Landing Page?
June 14, 2009 12:41 AM
Answer

Srinath A

Rank: New Member

Posts: 22

Join Date: June 6, 2009

Recent Posts

Hi,

I was wondering how to achieve this :

When user logs in the portal, he must be redirected to his private page(s).

lets say :::
At admin side i created two organisations and created two users and allocated each user one organisation
and also created private pages for each organisation .
Organisations called Org1 and Org2.
and created Private Pages - >
1. Org1 -> PP1(Private page1 )
2. Org2 -> PP2(Private page2 )

created users and allocated Private Pages ->
User1 -> Org1 -> PP1
user2 -> Org2 -> PP1

The Present existing portal will redirect to same page after login , But i want to achieve

Once the User1 logins he should be redirected to his Private Page as his Landing Page (PP1 for this user)


Please give reply !!!
Oliver Bayer
RE: Per User Landing Page?
June 29, 2009 2:14 AM
Answer

Oliver Bayer

Rank: Liferay Master

Posts: 878

Join Date: February 18, 2009

Recent Posts

Hi,

if you want to redirect logged in users to their private pages (and not to the private pages of the organization they belong) take a look at my post from 19.03.09. It should explain the expected behaviour; otherwise feel free to ask again.

Greets Oli
Victor Zorin
RE: Per User Landing Page?
August 30, 2011 2:57 AM
Answer

Victor Zorin

Rank: Liferay Legend

Posts: 1176

Join Date: April 14, 2008

Recent Posts

What I found very useful is implementing an ability to set and edit of a default landing place on per user basis. For example, you may use user's description field for this purpose, i.e write the following line into it:
1
2default.landing.page.url=/group/orgname/home

Then, within your implementation of a DefaultLandingPage action get this line from user's description and redirect this user to that url, if it was set.

That approach also solves the choice issue when user is a member of multiple groups (orgs, communities, etc).
You can also have a look at this link: http://www.myoffice24x7.com/web/myplaces-landing-page-hook, it will pick one of the communities the user is a member of.
D B
RE: Per User Landing Page?
June 10, 2011 12:56 AM
Answer

D B

Rank: New Member

Posts: 8

Join Date: May 23, 2011

Recent Posts

Oliver Bayer:

you can set this behavior with the following line in the portal-ext.property file.
1auth.forward.by.last.path=false

Now the users are getting redirected to their private start page with the following url rule:
http://server-url:port/user/<username>/<page nr.1 name>


Unfortunately, your instruction is now working in our new install.
We are using Liferay6.0.6 on MySQL and Tomcat.
There are no navigation entries in the fields found at: Control Panel > Portal Settings > Navigation
And we've added your suggested line to portal-ext.properties file.

The server has been restarted, and the user - any user - continues to login to the /web/guest/home page...
NOT their private page of /user/<username>/<page name>

I've read all your messages in this particular thread about this issue. Can't find the answer in any manual or wiki.
Am I missing a configuration step? How can a user get their private page as their default landing page?
Thanks.
Dhrutika Vyas
RE: Per User Landing Page?
June 10, 2011 2:34 AM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 435

Join Date: February 9, 2009

Recent Posts

Hi,

For this ,you need to modify DefaultLandingPageAction class.

You need to add this property in portal-ext.properties
login.events.post=com.liferay.portal.events.CustomDefaultLandingPageAction

In CustomDefaultLandingPageAction,you can set your path variable which redirects to /user/getscreenname()/ur page.

Regards,
Dhrutika
D B
RE: Per User Landing Page?
June 10, 2011 10:10 AM
Answer

D B

Rank: New Member

Posts: 8

Join Date: May 23, 2011

Recent Posts

Dhrutika Parekh:

For this ,you need to modify DefaultLandingPageAction class.


Thanks for the quick reply. I have seen the "DefaultLandingPageAction" class referenced in other threads, but with no explanation of where to find the file or how to edit it. I've looked through all the installed folders and can't find it.

Could you please explain, or point me to a reference, that clearly outlines the steps for finding and editing this "DefaultLandingPageAction class".
Thanks,
Damon
Walter Christian Guardia Casas
RE: Per User Landing Page?
June 10, 2011 1:09 PM
Answer

Walter Christian Guardia Casas

Rank: Regular Member

Posts: 126

Join Date: May 5, 2010

Recent Posts

Hi,

If you want your users after login take their landing page like their private page, you should try set up this parameter in your portal(-ext).properties:

auth.forward.by.last.path=false

And check this:

#
# Set whether or not private layouts are enabled. Set whether or not private
# layouts are modifiable. Set whether or not private layouts should be auto
# created if a user has no private layouts. If private layouts are not
# enabled, the other two properties are assumed to be false.
#
layout.user.private.layouts.enabled=true
layout.user.private.layouts.modifiable=true
layout.user.private.layouts.auto.create=true

#
# Set this to true if users must have the Power User role to have private
# pages.
#
layout.user.private.layouts.power.user.required=false

This should work, if not then you go on with the custom DefaultLandingPage class.

Regards,
D B
RE: Per User Landing Page?
June 10, 2011 8:38 PM
Answer

D B

Rank: New Member

Posts: 8

Join Date: May 23, 2011

Recent Posts

Thanks Walter, but your suggested portal-ext settings have no effect. Out-of-the-box 6.0.6 seems to already have them set as defaults in portal.properties.
steve rieger
RE: Per User Landing Page?
June 10, 2011 10:23 PM
Answer

steve rieger

Rank: Expert

Posts: 436

Join Date: September 11, 2006

Recent Posts

you will need to modify the login action to lookup UserID and generate the url for landing, for example, landing should be
/web/$UserID/private
D B
RE: Per User Landing Page?
June 11, 2011 12:09 AM
Answer

D B

Rank: New Member

Posts: 8

Join Date: May 23, 2011

Recent Posts

steve rieger:
you will need to modify the login action to lookup UserID


Thanks for your reply, Steve, but I lack the context to understand your direction. I have been trying to research where and how to "modify the login action", but am coming up short. The concept of adding a variable $UserID does make sense, though -- just wish it could somehow be easily added at Control Panel > Portal Settings > Navigaton > Default Landing Page... but no luck =)
steve rieger
RE: Per User Landing Page?
June 12, 2011 8:22 AM
Answer

steve rieger

Rank: Expert

Posts: 436

Join Date: September 11, 2006

Recent Posts

no you will not be able to do this via the control panel
David Bywaters
RE: Per User Landing Page?
June 26, 2011 11:30 PM
Answer

David Bywaters

Rank: New Member

Posts: 1

Join Date: June 26, 2011

Recent Posts

steve rieger:
no you will not be able to do this via the control
panel
I have the same issue as Damon, no one seems to want to
explain exactly how to modify the &quot;DefaultLandingPageAction
class&quot;. The requirement for custom landing pages seems so obvious
and is why I tried a portal approach to start with. I would have saved
myself hours/days by just using basic php pages.
Praveen P
RE: Per User Landing Page?
April 1, 2012 10:46 PM
Answer

Praveen P

Rank: Regular Member

Posts: 100

Join Date: February 20, 2012

Recent Posts

hi i changed default landing page in control panel->portal settings->default landing page to /web/guest/home but its not working fine

i want after log in user should get his public page as a home page please help me out
Dhrutika Vyas
RE: Per User Landing Page?
April 2, 2012 6:03 AM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 435

Join Date: February 9, 2009

Recent Posts

Hi ,

You need to modify DefaultLandingPageAction class to achieve this.

Regards,
Dhrutika
Praveen P
RE: Per User Landing Page?
April 12, 2012 4:52 AM
Answer

Praveen P

Rank: Regular Member

Posts: 100

Join Date: February 20, 2012

Recent Posts

thank you dhrutika