getting screen.width in ftl

2013-01-15 Thread Skip
I am trying to make some ftl code look better on cell phones without sacrificing the look on desktops. I can remove some non-critical content in the ftl if I knew the screen width was less than a certain value. Can I get screen.width in a bash (groovy) script or in the ftl? Its obviously easy in

Re: getting screen.width in ftl

2013-01-15 Thread Jacques Le Roux
Look at files ending with js.ftl and how they are used Jacques From: "Skip" >I am trying to make some ftl code look better on cell phones without > sacrificing the look on desktops. > > I can remove some non-critical content in the ftl if I knew the screen width > was less than a certain value.

RE: getting screen.width in ftl

2013-01-15 Thread Skip
[mailto:jacques.le.r...@les7arts.com] Sent: Tuesday, January 15, 2013 1:59 PM To: user@ofbiz.apache.org Subject: Re: getting screen.width in ftl Look at files ending with js.ftl and how they are used Jacques From: "Skip" >I am trying to make some ftl code look better on cell phones without >

Re: getting screen.width in ftl

2013-01-16 Thread Nick Rosser
elements I did not want to show on handheld devices. Probably a better solution anyway. Skip -Original Message- From: Jacques Le Roux [mailto:jacques.le.r...@les7arts.com] Sent: Tuesday, January 15, 2013 1:59 PM To: user@ofbiz.apache.org Subject: Re: getting screen.width in ftl Look at

RE: getting screen.width in ftl

2013-01-16 Thread Skip
:56 PM To: user@ofbiz.apache.org Subject: Re: getting screen.width in ftl Skip, We have a pretty good way of doing this in our BigFish eCommerce solution. Obviously the entire approach is not applicable for what you are trying to do but you may want to read the guide that we have ... it has some good g

Re: getting screen.width in ftl

2013-01-16 Thread Nick Rosser
for now. Skip -Original Message- From: Nick Rosser [mailto:nros...@salmonllc.com] Sent: Wednesday, January 16, 2013 12:56 PM To: user@ofbiz.apache.org Subject: Re: getting screen.width in ftl Skip, We have a pretty good way of doing this in our BigFish eCommerce solution. Obviously the

Re: getting screen.width in ftl

2013-01-16 Thread Robert G.
rendered. > >> > >> However, got it done with CSS media query like this: > >> > >> @media handheld, only screen and (max-width: 800px){ > >> .notRequired {display: none !important;} > >> } > >> > >> by adding a notRequired class

Re: getting screen.width in ftl

2013-01-16 Thread Robert G.
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

Re: getting screen.width in ftl

2013-01-17 Thread Paul Piper
I would not recommend to do anything with Javascript in this case. Responsive design is the most obvious solution and should be the most preferrable. There are alot of resources available that can show you how to do this properly for the different standard solutions. In adddition to your own solu

Re: getting screen.width in ftl

2013-01-17 Thread Paul Piper
As a follow-up: The solution described in the bigfish link is very limited, so I don't recommend to use or follow it. Basically, with the recommendation described there you are left with a version that won't work on any form of tablet, or mobile devices that are held sideways... I don't want to be

Re: getting screen.width in ftl

2013-01-17 Thread Nick Rosser
Paul, My response was just to share our approach/technique. I wasn't expecting Skip, or anyone, to adopt BigFish ... I'm sure he has built out a complete system and to change tack was not the intent. Simply sharing an experience. Anyway, it is an interesting topic and others have made some g

Re: getting screen.width in ftl

2013-01-17 Thread Paul Piper
You are missing the point of my reply, Nick: Responsive is good and the way I also recommend. Your link however, only shows a fraction of what should be done to do it properly and doesn't take care of a lot of the screen sizes, which is why recommend to look elsewhere for the information. -- Vi

Re: getting screen.width in ftl

2013-01-17 Thread Ted Byers
Hi Paul, On Thu, Jan 17, 2013 at 4:48 AM, Paul Piper wrote: > I would not recommend to do anything with Javascript in this case. Responsive > design is the most obvious solution and should be the most preferrable. > And my first instinct would have been to use js, perhaps because I have recently

Re: getting screen.width in ftl

2013-01-17 Thread Nick Rosser
I understood your comment. Wasn't that difficult. And agreed with your point, and mentioned that we were simply sharing an approach/technique with the original query. The group is often used to build information collectively from many different sources, sharing different experiences. If everyt

RE: getting screen.width in ftl

2013-01-17 Thread Skip
amically set classes based on the screen size. Thanks to all Skip -Original Message- From: Paul Piper [mailto:p...@ilscipio.com] Sent: Thursday, January 17, 2013 1:48 AM To: user@ofbiz.apache.org Subject: Re: getting screen.width in ftl I would not recommend to do anything with Jav