Foros de discusión

Change default page to group or user page -- how hard can it be?

Chuck Wyatt, modificado hace 11 años.

Change default page to group or user page -- how hard can it be?

New Member Mensajes: 10 Fecha de incorporación: 17/10/11 Mensajes recientes
Right now for default login fields, we have left these blank so that once a user logs in, they end up on the main landing page for our test Liferay install, http://testliferay.edu/ as simple as that.

However, what I'd like to do is set up the default page so that it is, in effect: /web/username/home

That seems to be pretty difficult? If I plugin /web/guest/home into the GUI in portal-settings for default login page, I get a file not found upon login with a test user that has power-user as the default role. It is because they aren't "guest" role that it is throwing the error?

I'm including a screenshot of my test user page. That's essentially where I want each user to land upon login. Possible without editing class files, etc? I'm happy to add a line to the portal-ext.properties file, but it seems like we could just add it to the gui. I've attempted this line in portal-ext.properties, but so far, no cigar:
default.landing.page.path=/web/guest/home

Thanks,

Chuck

thumbnail
Dhrutika Vyas, modificado hace 11 años.

RE: Change default page to group or user page -- how hard can it be?

Expert Mensajes: 435 Fecha de incorporación: 9/02/09 Mensajes recientes
Hi Chuck,

It couldn't be possible without writing code. For landing to user's page you need to overwrite defaultlandingaction.java class.

You can set portlets on user page by two way either by properties or by usergroups.

Let me know if you want to achieve this solution.I will provide more details.

Regards,
Dhrutika
Chuck Wyatt, modificado hace 11 años.

RE: Change default page to group or user page -- how hard can it be?

New Member Mensajes: 10 Fecha de incorporación: 17/10/11 Mensajes recientes
Hi Dhrutika,

Since receiving your message I've been reading more posts about how to do this, but maybe if you have more information about how to redirect to a users group page, that's more precisely what we're looking for. Ultimately we'll have users in groups based on their LDAP group membership, so that's a whole larger problem. But first I thought I would create some temporary groups, assign to our test users and see how that works to have them login to their group page.

So to redirect to a "group" page, I believe I need to make changes to defaultlandingaction.java class as well as portal-ext.properties, is that correct?

Thank you very much!

Chuck
thumbnail
Dhrutika Vyas, modificado hace 11 años.

RE: Change default page to group or user page -- how hard can it be?

Expert Mensajes: 435 Fecha de incorporación: 9/02/09 Mensajes recientes
Chuck Wyatt:
Hi Dhrutika,

Since receiving your message I've been reading more posts about how to do this, but maybe if you have more information about how to redirect to a users group page, that's more precisely what we're looking for. Ultimately we'll have users in groups based on their LDAP group membership, so that's a whole larger problem. But first I thought I would create some temporary groups, assign to our test users and see how that works to have them login to their group page.

So to redirect to a "group" page, I believe I need to make changes to defaultlandingaction.java class as well as portal-ext.properties, is that correct?

Thank you very much!

Chuck


Hi Chuck,

Yes you are correct. You can first how it works. You need to modify defaultlandingaction for this.

1. Create one user group with required pages and portlets.
2. In settings assign that user group name in default user association.
3. Modify below portal-ext.properties to modify landing action class.
4. landing action class update last path variable as /web/usercreenname/landing url.

Hope this helps.

Regards,
Dhrutika