On Monday, May 14, 2012 8:56:41 PM UTC+8, Anthony wrote:
>
> On Monday, May 14, 2012 8:41:59 AM UTC-4, Massimo Di Pierro wrote:
>>
>> I would like to see the implementation. I am pretty sure this will break 
>> the bytecode compilation of apps.
>>
>
> {{extend response.layout or "layout.html"}}
>
> Yes -- to compile, the view to extend has to be known at compile time, but 
> the value of response.layout is dynamically set at run time.
>
> Anthony 
>

Thanks for pointing out this, gentlemen. I seldom compile my app before so 
I don't know that behavior. Grrr.

1. But at least we can ship the views/jqm_layout.html (see my first post) 
with welcome scaffold app. Ok?

2. And then I will personally add an extra views/jqm_generic.html like this:

    {{extend "jqm_layout.html"}}
    ...... # others are same as views/generic.html

after that, all my mobile pages just need to use response.view = 
'jqm_generic.html'. What do you think about that?

2.1 I even tried a views/generic.mobi like this:

    {{extend "jqm_layout.html"}}{{response.headers['Content-Type'] = 
'text/html'}}
    ...... # others are same as views/generic.html 

It works too, however I am afraid crud logic will not work for pages whose 
extension are other than .html and .load

Ideas?

Regards,
Ray

Reply via email to