Re: [web2py] Conditional {{extend layout.html}}?

2012-12-29 Thread Simon Ashley
Thanks, excellent, that works .. (compiling wont been an immediate issue) --

[web2py] Conditional {{extend layout.html}}?

2012-12-28 Thread Simon Ashley
Wondering if it is possible to have a conditional {{extend layout.html}} similar to the following? {{if session.call:}} {{extend 'layout_XXX.html'}} {{pass}} {{if not session.call:}} {{extend 'layout.html'}} {{include 'YYY.html'}} {{pass}} Required for users with requiring

Re: [web2py] Conditional {{extend layout.html}}?

2012-12-28 Thread Bruno Rocha
You can, but will not work if you compile your app. This can be done with. in models/anything.py response.layout_path = layout_XXX.html if session.call else 'layout.html' # this can also be changed in controller if needed def action(): if something: response.layout_path =

Re: [web2py] Conditional {{extend layout.html}}?

2012-12-28 Thread Massimo Di Pierro
Can be done but won't work if you try distribute your app bytecode compiled. On Friday, 28 December 2012 23:50:11 UTC-6, rochacbruno wrote: You can, but will not work if you compile your app. This can be done with. in models/anything.py response.layout_path = layout_XXX.html if