On Wed, Jan 27, 2010 at 11:28 PM, iltriki <[email protected]> wrote:
> Hi there..
> a simple question about site layout template.(http://tinyurl.com/
> ybsz7ww)
> I'm using a common layout with header, footer and sidebar and
> different views inside of it.
> How can i display dynamic content on layout?
> Imagine a sidebar with the number of visitors of the site; is it
> possible to pass a variable like 'visitor_numbers' to layout without
> using global session?

In a sub-template you say:

$var some_var: value

It becomes a property of the content variable that is passed to the
base layout. Then in your base layout:

$def with (content)

$content.some_var

-- 
Branko Vukelić

http://foxbunny.tumblr.com/
http://www.flickr.com/photos/16889...@n04/
http://www.twitter.com/foxbunny
http://github.com/foxbunny

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to