Hi there, 1. I am working at my first mobile website recently. At first I spent (quite) some time to know and download the hard-to-find web2py.plugin.jqmobile.w2p, then I realize the main resource I need is just its views/plugin_jqmobile/layout.html, so it comes to an idea. Why not just pack that tiny layout file inside the default scaffold app as views/jqm_layout.html? (Attached in this post)
2. And then it is so easy to use it. Just {{extend "jqm_layout.html"}} instead of {{extend "layout.html"}} in your view files. I will also suggest one step further. Change the first line of generic.html from: {{extend "layout.html"}} to: {{extend response.layout or "layout.html"}} This way developers can easily switch into two (or even more) layouts on demand by defining a proper response.layout, yet still backward compatible. Will this go into trunk? Regards, RayTitle: {{=response.title or request.application}}
{{=response.title}}
{{block header}} {{if not auth.user:}} Login {{else:}} Logout {{pass}} {{=T("Home")}} {{end}}
{{if response.flash:}}
{{=response.flash}}
{{pass}}
{{if response.menu:}}
- {{=T("Main Menu")}} {{for _ in response.menu:}}
- {{=_[0]}} {{pass}}
{{block footer}}
powered by web2py - @2011
{{end}}