留言板

Per User Landing Page?

thumbnail
Jason Gabler,修改在15 年前。

Per User Landing Page?

New Member 帖子: 6 加入日期: 09-3-12 最近的帖子
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
thumbnail
Jason Gabler,修改在15 年前。

RE: Per User Landing Page?

New Member 帖子: 6 加入日期: 09-3-12 最近的帖子
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,修改在15 年前。

RE: Per User Landing Page?

Liferay Master 帖子: 894 加入日期: 09-2-18 最近的帖子
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.
auth.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,修改在15 年前。

RE: Per User Landing Page?

Junior Member 帖子: 26 加入日期: 09-3-11 最近的帖子
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,修改在15 年前。

RE: Per User Landing Page?

Liferay Master 帖子: 894 加入日期: 09-2-18 最近的帖子
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.
auth.forward.by.last.path=true
default.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,修改在14 年前。

RE: Per User Landing Page?

New Member 帖子: 22 加入日期: 09-6-6 最近的帖子
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,修改在14 年前。

RE: Per User Landing Page?

Liferay Master 帖子: 894 加入日期: 09-2-18 最近的帖子
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
thumbnail
Victor Zorin,修改在14 年前。

RE: Per User Landing Page?

Liferay Legend 帖子: 1228 加入日期: 08-4-14 最近的帖子
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:

default.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.
Damon Matthews,修改在12 年前。

RE: Per User Landing Page?

New Member 帖子: 8 加入日期: 11-5-24 最近的帖子
Oliver Bayer:

you can set this behavior with the following line in the portal-ext.property file.
auth.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.
thumbnail
Dhrutika Parekh,修改在12 年前。

RE: Per User Landing Page?

Expert 帖子: 435 加入日期: 09-2-9 最近的帖子
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
Damon Matthews,修改在12 年前。

RE: Per User Landing Page?

New Member 帖子: 8 加入日期: 11-5-24 最近的帖子
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
thumbnail
Walter Christian Guardia Casas,修改在12 年前。

RE: Per User Landing Page?

Regular Member 帖子: 127 加入日期: 10-5-5 最近的帖子
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,
Damon Matthews,修改在12 年前。

RE: Per User Landing Page?

New Member 帖子: 8 加入日期: 11-5-24 最近的帖子
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.
thumbnail
steve rieger,修改在12 年前。

RE: Per User Landing Page?

Expert 帖子: 436 加入日期: 06-9-11 最近的帖子
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
Damon Matthews,修改在12 年前。

RE: Per User Landing Page?

New Member 帖子: 8 加入日期: 11-5-24 最近的帖子
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 =)
thumbnail
steve rieger,修改在12 年前。

RE: Per User Landing Page?

Expert 帖子: 436 加入日期: 06-9-11 最近的帖子
no you will not be able to do this via the control panel
David Bywaters,修改在12 年前。

RE: Per User Landing Page?

New Member 发布: 1 加入日期: 11-6-27 最近的帖子
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.
Ashley Pietersen,修改在5 年前。

RE: Per User Landing Page?

Junior Member 帖子: 44 加入日期: 11-2-28 最近的帖子
I completely agree with the post of David Bywaters:  "The requirement for custom landing pages seems so obvious and is why I tried a portal approach to start with"

I have the same experience, I have searched many post about this issue and still have no solution found, other then digging in all sort of files under the hood. (we use a hosted CE Liferay instance V7.0.4 that gives us no acces under de hood) Any relevant portlet on the Marketplace are only valid for version 6.X (which seems to be true for many other potential and usefull portlets that are not covered by standard Liferay CE v7.X)

What is the real problem to add an extra field in the Console User page where you can add/define a landingpage (not persee meaning the private personal page but any subsite page) where the user can start from using Liferay. Some explanation (or working tip) would be very appreciated.

Thanks
​​​​​​​Ashley Pietersen
thumbnail
devaraj S,修改在12 年前。

RE: Per User Landing Page?

Regular Member 帖子: 100 加入日期: 12-2-21 最近的帖子
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
thumbnail
Dhrutika Parekh,修改在12 年前。

RE: Per User Landing Page?

Expert 帖子: 435 加入日期: 09-2-9 最近的帖子
Hi ,

You need to modify DefaultLandingPageAction class to achieve this.

Regards,
Dhrutika
thumbnail
Praveen P,修改在12 年前。

RE: Per User Landing Page?

Regular Member 帖子: 100 加入日期: 12-2-21 最近的帖子
thank you dhrutika