Site Layouts with parameters

34 views
Skip to first unread message

Ferran Fontcuberta

unread,
Jan 21, 2010, 11:41:19 AM1/21/10
to web.py
It is possible to pass parameters to base layout, like the title or
something like this?

Pablo Antonio

unread,
Jan 21, 2010, 11:45:41 AM1/21/10
to we...@googlegroups.com
On Thu, Jan 21, 2010 at 1:41 PM, Ferran Fontcuberta <fer...@fompi.net> wrote:
It is possible to pass parameters to base layout, like the title or
something like this?

You can set properties in the template that you use as content. For example, take
a look at this layout template: 

The title is taken from the template which is passed as parameter. An example
of a "content" template is this: 

And here's how you make your rendering function use layout.html as a base
template:
 
Hope it helps,

--
Pablo A.
http://www.pablo-a.com.ar/

mengu

unread,
Jan 25, 2010, 1:34:47 AM1/25/10
to web.py
actually django handles this with base request context. does webpy
have any plan on supporting something like this?
Reply all
Reply to author
Forward
0 new messages