ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Skip" <s...@thedevers.org>
Subject RE: getting screen.width in ftl
Date Wed, 16 Jan 2013 00:47:22 GMT
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