Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Rishi Dev Gupta
Load theme dynamically based on user session
21 de Dezembro de 2012 02:20
Resposta

Rishi Dev Gupta

Ranking: Expert

Mensagens: 255

Data de entrada: 23 de Novembro de 2008

Mensagens recentes

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?
Anônimo
RE: Load theme dynamically based on user session
21 de Dezembro de 2012 07:11
Resposta
Sushil Saini
RE: Load theme dynamically based on user session
22 de Dezembro de 2012 14:57
Resposta

Sushil Saini

Ranking: Regular Member

Mensagens: 104

Data de entrada: 27 de Julho de 2011

Mensagens recentes

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

Rishi Dev Gupta

Ranking: Expert

Mensagens: 255

Data de entrada: 23 de Novembro de 2008

Mensagens recentes

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.