Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Zeeshan Khan
auto changing of liferay theme for mobiles
26 de abril de 2012 22:30
Respuesta

Zeeshan Khan

Ranking: Expert

Mensajes: 349

Fecha de incorporación: 20 de julio de 2011

Mensajes recientes

Hi !

I am usin LR 6.0.6. I want to change the theme (default theme = classic) to the iphone theme (or whatever) when the user has navigated to the liferay portal using a mobile device. What i need to do soo that my application detects it automatically and redirect to appropriate theme......???

thnx !
David H Nebinger
RE: auto changing of liferay theme for mobiles
27 de abril de 2012 8:10
Respuesta

David H Nebinger

Community Moderator

Ranking: Liferay Legend

Mensajes: 8938

Fecha de incorporación: 1 de septiembre de 2006

Mensajes recientes

It's handled automagically. Just set up the mobile theme in the settings -> display settings control panel.
David García González
RE: auto changing of liferay theme for mobiles
18 de junio de 2012 3:21
Respuesta

David García González

Ranking: Regular Member

Mensajes: 127

Fecha de incorporación: 14 de julio de 2009

Mensajes recientes

David H Nebinger:
It's handled automagically. Just set up the mobile theme in the settings -> display settings control panel.

I am trying to test this but It is not working. I am trying it with an iPhone. Perhaps the iphone is not recognized as a WAP device.

Do I have to configure any extra setting in liferay-ext.properties or do I have to try with another device?

Here is a link to a thread where explains the not detection for the iPhone:

http://www.liferay.com/es/community/forums/-/message_boards/message/11970592

Thanks!
Amit Doshi
RE: auto changing of liferay theme for mobiles
18 de junio de 2012 3:23
Respuesta

Amit Doshi

Ranking: Liferay Master

Mensajes: 547

Fecha de incorporación: 29 de diciembre de 2010

Mensajes recientes

Hi Zeeshan,

Based on the user Agent you can identify.

$request.getHeader("User-Agent").toString()

Regards,
Amit Doshi
Manish Yadav
RE: auto changing of liferay theme for mobiles
24 de junio de 2012 5:51
Respuesta

Manish Yadav

Ranking: Expert

Mensajes: 385

Fecha de incorporación: 26 de mayo de 2012

Mensajes recientes

might be this post help you for redirection to mobile community Mobile Redirect In Liferay
Sachin Mane
RE: auto changing of liferay theme for mobiles
24 de junio de 2012 23:06
Respuesta

Sachin Mane

Ranking: Junior Member

Mensajes: 76

Fecha de incorporación: 9 de abril de 2012

Mensajes recientes

I dont think this happens automatically in Liferay version 6.0. In 6.1, it is.

6.1 automatically detects the device type and makes it available for liferay code to use. 6.1 also comes with a wurfl-web plugin which is used to setup rules based on the detected device type. This plugin relies on a wurfl repository available at http://wurfl.sourceforge.net/.

In 6.0, if you just want a perform redirection based on a simple rules, then you can use a filter which will check the user-agent and perform the re-direction.

If you want to alter the theme and layout then you can use ServiePreAction as described in http://www.liferay.com/community/forums/-/message_boards/message/11601895

Or you can add full fledged device recognition and rule setup capabilities similar to 6.1 using ext environment.