ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Rosser <nros...@salmonllc.com>
Subject Re: getting screen.width in ftl
Date Wed, 16 Jan 2013 20:55:51 GMT
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
nrosser@salmonllc.com
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:jacques.le.roux@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"<skip@thedevers.org>
>> 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
>>

Mime
View raw message