Tribune

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

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Jason Gabler
Per User Landing Page?
18 marzo 2009 15.36
Risposta

Jason Gabler

Punteggio: New Member

Messaggi: 6

Data di Iscrizione: 12 marzo 2009

Messaggi recenti

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?
18 marzo 2009 16.06
Risposta

Jason Gabler

Punteggio: New Member

Messaggi: 6

Data di Iscrizione: 12 marzo 2009

Messaggi recenti

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?
19 marzo 2009 3.49
Risposta

Oliver Bayer

Punteggio: Liferay Master

Messaggi: 883

Data di Iscrizione: 18 febbraio 2009

Messaggi recenti

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?
25 marzo 2009 12.14
Risposta

Hasnain Rasheed

Punteggio: Junior Member

Messaggi: 26

Data di Iscrizione: 11 marzo 2009

Messaggi recenti

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?
1 aprile 2009 5.02
Risposta

Oliver Bayer

Punteggio: Liferay Master

Messaggi: 883

Data di Iscrizione: 18 febbraio 2009

Messaggi recenti

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?
14 giugno 2009 0.41
Risposta

Srinath A

Punteggio: New Member

Messaggi: 22

Data di Iscrizione: 6 giugno 2009

Messaggi recenti

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?
29 giugno 2009 2.14
Risposta

Oliver Bayer

Punteggio: Liferay Master

Messaggi: 883

Data di Iscrizione: 18 febbraio 2009

Messaggi recenti

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?
30 agosto 2011 2.57
Risposta

Victor Zorin

Punteggio: Liferay Legend

Messaggi: 1178

Data di Iscrizione: 14 aprile 2008

Messaggi recenti

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?
10 giugno 2011 0.56
Risposta

D B

Punteggio: New Member

Messaggi: 8

Data di Iscrizione: 23 maggio 2011

Messaggi recenti

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?
10 giugno 2011 2.34
Risposta

Dhrutika Vyas

Punteggio: Expert

Messaggi: 438

Data di Iscrizione: 9 febbraio 2009

Messaggi recenti

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?
10 giugno 2011 10.10
Risposta

D B

Punteggio: New Member

Messaggi: 8

Data di Iscrizione: 23 maggio 2011

Messaggi recenti

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?
10 giugno 2011 13.09
Risposta

Walter Christian Guardia Casas

Punteggio: Regular Member

Messaggi: 127

Data di Iscrizione: 5 maggio 2010

Messaggi recenti

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?
10 giugno 2011 20.38
Risposta

D B

Punteggio: New Member

Messaggi: 8

Data di Iscrizione: 23 maggio 2011

Messaggi recenti

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?
10 giugno 2011 22.23
Risposta

steve rieger

Punteggio: Expert

Messaggi: 436

Data di Iscrizione: 11 settembre 2006

Messaggi recenti

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?
11 giugno 2011 0.09
Risposta

D B

Punteggio: New Member

Messaggi: 8

Data di Iscrizione: 23 maggio 2011

Messaggi recenti

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?
12 giugno 2011 8.22
Risposta

steve rieger

Punteggio: Expert

Messaggi: 436

Data di Iscrizione: 11 settembre 2006

Messaggi recenti

no you will not be able to do this via the control panel
David Bywaters
RE: Per User Landing Page?
26 giugno 2011 23.30
Risposta

David Bywaters

Punteggio: New Member

Messaggi: 1

Data di Iscrizione: 26 giugno 2011

Messaggi recenti

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?
1 aprile 2012 22.46
Risposta

Praveen P

Punteggio: Regular Member

Messaggi: 100

Data di Iscrizione: 20 febbraio 2012

Messaggi recenti

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?
2 aprile 2012 6.03
Risposta

Dhrutika Vyas

Punteggio: Expert

Messaggi: 438

Data di Iscrizione: 9 febbraio 2009

Messaggi recenti

Hi ,

You need to modify DefaultLandingPageAction class to achieve this.

Regards,
Dhrutika
Praveen P
RE: Per User Landing Page?
12 aprile 2012 4.52
Risposta

Praveen P

Punteggio: Regular Member

Messaggi: 100

Data di Iscrizione: 20 febbraio 2012

Messaggi recenti

thank you dhrutika