On Thu, Feb 18, 2010 at 6:38 AM, p_W <[email protected]> wrote:

> Is there a way to use partial templates or layouts like in most of the
> bigger frameworks?  I just so I can include a header, footer, nav,
> etc?
>
> ex:
>
> $def with (header, footer)
> print $:header
> <p> Page Content</p>
> print $:footer
>

I did like this:

#code.py
web.template.Template.globals['render'] = render

#index.html
$:render.header()
<p>some html </p>
$:render.foot()

-- 
大郎:百才招聘(baicai.com).产品部
Email: [email protected]
Gtalk: [email protected]
twitter.com/qichangxing
http://blog.hi0791.com

-- 
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