ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert G." <...@mercon24.de>
Subject Re: getting screen.width in ftl
Date Thu, 17 Jan 2013 00:13:45 GMT
sorry for confusing maybe, its late :)

short summary (options which comes to my mind):
1. option:
- check with javascript if he is mobile
- redirect to another page
--> working

2. more elegant option (cause no redirect required)
- work with the session object
- create a js check if he is mobile
- create an ajax connection to your server to write this to the server side
session (i.ex. with java on server side). write here the attribute
/session.setAttribute("isMobile","true")/ to server session
- request with groovy file if he is mobile, and than in ftl just check this
with if / else and show different content.

thats it I think

the second variant is also very comfortable to use for other stuff like
setting client configurations like category views etc. So the customer can
make individual settings, which will not be lost on other pages / page
reloads cause its server side known.

hope that helps.

View this message in context: http://ofbiz.135035.n4.nabble.com/getting-screen-width-in-ftl-tp4638951p4638967.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

View raw message