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 session.call else 
> 'layout.html'
>
> # this can also be changed in controller if needed
>
> def action():
>     if something:
>         response.layout_path = "otherfile.html"
>
>  So in view
>
> {{extend response.layout_path}}
>
>     
>
>
> On Sat, Dec 29, 2012 at 3:15 AM, Simon Ashley <greg...@gmail.com<javascript:>
> > wrote:
>
>> 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 different configurations. 
>> Have tried alternative approaches without success.
>> TIA
>>
>>  -- 
>>  
>>  
>>  
>>
>
>

-- 



Reply via email to