[web2py] Re: layouts and =include

2011-03-20 Thread Kevin Ivarsen
Hi kyrussa, Try the following: layout.html: Begin main layout {{include}} End main layout layout_body.html: {{extend layout.html}} Begin layout body {{include}} End layout body mypage.html {{extend layout_body.html}} This is my content When you render mypage, you should get:

[web2py] Re: layouts and =include

2011-03-20 Thread Kevin Ivarsen
For another alternative which I think is more flexible, look at the {{block}} syntax. This lets you define multiple sections that can be overridden by an extending template. Example (untested): -- layout.html title{{block title}}My default title{{end}}/title script {{block scripts}} {{end}}

[web2py] Re: layouts and =include

2011-03-20 Thread kyussa
Yes, thats what I am playing with now. Thanks :) Regards Adam