You can use block in views
##layout.html##
{{block header}}
<header>aaaaa</header>
{{end}}
then inherit it in the view..
or you can define functions in model or modules (see instamtpress source
code)
def myheader():
html = """
<html> <hrader>njvnjnvjf</header></html>
"""
return XML(html)
then, all it in any place of the view
{{=myheader()}}
or you can include if thats static (no template parsing)
{{include 'pat/to/file'}}
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
[ Consultoria em desenvolvimento web: http://www.blouweb.com ]
On Mon, Jun 20, 2011 at 9:32 PM, pbreit <[email protected]> wrote:
> What's the best way to re-use a snippet of HTML in different places?
> Components and LOAD()? Or is there some way to include a block? These can be
> lengthy snippets so I'd rather do it more in HTML than with tags.