Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Rishi Dev Gupta
Load theme dynamically based on user session
21. Dezember 2012 02:20
Antwort

Rishi Dev Gupta

Rang: Expert

Nachrichten: 255

Eintrittsdatum: 23. November 2008

Neue Beiträge

Hi

I am using Liferay 6.1.2.

I have site which have a set of public pages with default theme, lets call theme-A.

In my theme I have given a drop down which allows a guest user or logged in user to choose one option. This drop down has a list of other 2 available themes say (theme-B and theme-C).

So user can choose different theme as and when he wants from this dropdown. The theme changes are done by site members only and not by admin, thus if there are 2 users on same site same page one user can view the site with theme-A and another user can see the site with theme-B.

The themeId as selected by user will be stored somewhere in session, and have to be applied each time a page is loaded so that it overrides the default liferay behaviour of picking and applying the site theme from database.

How can I do so?

Please help?
Anonym
RE: Load theme dynamically based on user session
21. Dezember 2012 07:11
Antwort

Anonym

Sushil Saini
RE: Load theme dynamically based on user session
22. Dezember 2012 14:57
Antwort

Sushil Saini

Rang: Regular Member

Nachrichten: 104

Eintrittsdatum: 27. Juli 2011

Neue Beiträge

Thanks Bradley,,... nice article ..
Rishi Dev Gupta
RE: Load theme dynamically based on user session
31. Dezember 2012 05:38
Antwort

Rishi Dev Gupta

Rang: Expert

Nachrichten: 255

Eintrittsdatum: 23. November 2008

Neue Beiträge

Thanks Bradley, It will resolve my approach but as per my needs i need to further customize this so that the value is stored along with user, so that next time after few days when user comes it will see the same scheme as selected during previous visit.

I will be using the expando to further persist the data.