Fórumok

Switch theme by button

Juraj Krahulec, módosítva 8 év-val korábban

Switch theme by button

New Member Bejegyzések: 4 Csatlakozás dátuma: 2014.05.20. Legújabb bejegyzések
Hi all,

is there a way, how can I switch theme in velocity(portal_normal.vm) in Liferay 6.2?

Thank you for any help.
thumbnail
Andew Jardine, módosítva 8 év-val korábban

RE: Switch theme by button

Liferay Legend Bejegyzések: 2416 Csatlakozás dátuma: 2010.12.22. Legújabb bejegyzések
Hi Juraj,

Not sure I understand. Do you mean you want to switch a theme to use velocity? or do you mean you have 2 themes deployed (theme A and theme emoticon and you are looking to let the user change from theme A to theme B on the fly?
Juraj Krahulec, módosítva 8 év-val korábban

RE: Switch theme by button

New Member Bejegyzések: 4 Csatlakozás dátuma: 2014.05.20. Legújabb bejegyzések
Yes, I have deployed two themes, and I want let the user change on the fly.
thumbnail
Andew Jardine, módosítva 8 év-val korábban

RE: Switch theme by button

Liferay Legend Bejegyzések: 2416 Csatlakozás dátuma: 2010.12.22. Legújabb bejegyzések
I've never done that before, and I would imagine that it would be tricky given that a theme can be set at multile layers. For example, you could have the default one for the group, but then also one set specifically for a page. The best place to start would be to have a look in the portal source at the layouts_admin portlet (/html/portlet/layouts_admin) to see if you can figure out how the selection in there translates into an API call. Then, assuming that the classes required are visible in the portal-service.jar, try to reproduce on your side. Might be an easier way -- but this would at least help you understand how Liferay does it internally.