Yea, I don't know how I missed it in the Docs, but I ended up doing
this:

[code]
from web import template

render = template.render('templates/', base='layout')

....
[/code]

where 'layout.html' is in your templates folder and is the framework
for your site.  layout.html should be of the form:

[code]
$def with (content)
<!DOCTYPE html>
<html>
<body>
$:content
</body>
</html>
[/code]

On Feb 18, 10:59 am, Branko Vukelic <[email protected]> wrote:
> 2010/2/18 Ken <[email protected]>:
>
> > I did like this:
>
> > #code.py
> > web.template.Template.globals['render'] = render
>
> > #index.html
> > $:render.header()
> > <p>some html </p>
> > $:render.foot()
>
> Personally, I don't like this because it shoves up your template more
> than it needs.
>
> --
> Branko Vukelić
>
> http://foxbunny.tumblr.com/http://www.flickr.com/photos/16889...@n04/http://www.twitter.com/foxbunnyhttp://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