You cannot have extend in a conditional but you can have

{{extend layout}}

and in controller or model:

if phone.screensize < 100:
    lauout='layout100.htm;'
elif phone.screensize < 200:
    layout='layout200.html'
else:
    layout='layout.html'

On Aug 20, 5:38 am, Jason Brower <[email protected]> wrote:
> I built it ina a way that the phones had the same content but a
> different page.  So you can use an if statement in the view (or the
> controller if you wanted)
> if phone.screensize < 100:
> {{extend 'layout100.html'}}
> elif phone.screensize < 200:
> {{extend 'layout200.html'}}
> else:
> {{extend 'layout.html'}}
> At least in theory that would work.
> Depending on what you want you could also tell load a custom made css as
> well.
> br,
> Jason
>
> On Fri, 2010-08-20 at 02:09 -0700, David Marko wrote:
> > I'm working on mobile access to my web app built on web2py. I'm using
> > mobile.sniffer to detect mobile platform(which works quite well btw.)
> > but I'm not sure how to switch login form based on this detection. (I
> > need more simple login form than for standard web browser access)
>
> > Any hint on this?
>
> > David

Reply via email to