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 general pointers that may be useful for you.

http://bigfish.salmonllc.com/help/howSetupMobile.htm

Best Regards,

Nick Rosser
[email protected]
O: 516.742.7888 x221
C: 516.901.1720


On 1/15/2013 7:47 PM, Skip wrote:
Nothing much in these about getting screen width for use in the ftl.  Was
expecting that to be in the session of something.  Saw some jquery setting
of form widths, but I wanted to do this in FTL before the screen html code
is 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 to all the elements I did not want to show on
handheld devices.  Probably a better solution anyway.

Skip

-----Original Message-----
From: Jacques Le Roux [mailto:[email protected]]
Sent: Tuesday, January 15, 2013 1:59 PM
To: [email protected]
Subject: Re: getting screen.width in ftl


Look at files ending with js.ftl and how they are used

Jacques

From: "Skip"<[email protected]>
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 javascript, but I need to get it in the ftl code.


Thanks in advance

Skip

Reply via email to