On Monday, November 11, 2013 11:28:37 PM UTC-5, Kiran Subbaraman wrote:

>  My view is:
> Splitting / refactoring the contents of the layout.html into 'components' 
> - which contains a combination of css + html as mentioned in the original 
> note: https://groups.google.com/forum/#!topic/web2py/3NmrocjbwzM 
>
>
Are you saying you'd like something like this to be offered as an optional 
alternative or to replace the current layout.html? I don't think we want to 
have separate Ajax requests for every little piece of the layout.

Note, the current layout is already fairly modular, with separate blocks 
for the head, center, sidebars, and footer. It also allows you to 
conditionally include the left and right sidebars, Auth navbar, menu, logo, 
flash message, page title, and subtitle (by setting various attributes and 
global variables in the model, controller, and extending view code).

Maybe it would help if you provide some examples of what you are trying to 
achieve so we can figure out the best approach. If you want to re-use 
pieces of the layout in alternative layouts, perhaps we could put each 
piece in a separate template file and then just use {{include ...}}statements 
to insert them where needed. This would probably be much more 
efficient than running multiple Ajax requests to get what could just as 
easily be generated in a single request.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to