you cannot do this

> {{if is_admin:}}
>     {{extend 'adminLayout.html'}}
> {{else:}}
>     {{extend 'layout.html'}}
> {{pass}}
because {{extend}} and {{include}} are not python commands but
{{if...else...pass}} are. The former are resolved before the latter.

You can do instead

{{layout='adminLayout.html' if is_admin else 'layout.html'}}
{{extend layout}}

although this will break if you bytecode compile your app.

Massimo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to