Hi Anthony,
I wasn't sure if what I was doing was just a hack or how far it might
impact.
e.g if the application included some function with 'user' in the name like
'def ..user..()'
it too would pick up the alternate layout (I think).
Peter
--
Resources:
- http://web2py.com
- http://web
> {{if not 'user' in request.env.path_info:}}
> {{extend 'layout.html'}}
> {{else:}}
> {{extend 'mylayout.html'}}
> {{pass}}
>
Presumably this goes in the user.html view, so why bother with the
conditional logic and not just use:
{{extend 'mylayout.html'}}
Anthony
--
Res
very useful thanks !!
*will also use request.env.path_info to conditionally load js files*I had
forgotten *user.html*silly me( beating myself. )
*« Le désert croît… malheur à qui protège le désert ! » F.Nietzsche*
--
Resources:
- http://web2py.com
- http://web2py.com/book
Hi Pierre,
I don't know the recommended method and I have not tested to see exactly
how many pages are affected by this
(so I'm happy to be corrected) but this worked for me at least on the login
page...
edit user.html
and replace first line...
{{extend 'layout.html'}}
with
{{if
Do you replace the first line "extends" in pages that inherits from
"layout.html" by the "mylayout.html" ?
Em quarta-feira, 5 de julho de 2017 13:22:46 UTC-3, Pierre escreveu:
>
> Hi,
>
> how do i tell web2py to use *mylayout.html* instead of *layout.html* for
> *login* and other auth related p
5 matches
Mail list logo