I haven't done rails, but my boilerplate is in a template that is
"extended" by the
page specific templates. In fact, I have multiple levels: section
specific boilerplate
templates that extend a site wide template, with the section specific templates
being extended by the page (type) specific templates.
Look at the "extends" and "block" tags in the template tags reference
and tutorial.
It's seems easy to misunderstand the documentation on these, so let me try a
phrase or two: A template which will be extended provides one or more holes
which the extending templates can fill, by using the block tag. The
extending template
fills it with the block tag. block tags are named so that they can be
matched up. If an
extending template does not fill a particular block in the extended
template, then that
block's content in the extended template is used. If the extending
template uses that
block, then it's content is used instead. Stuff in an extending
template that is not in a
block, or which is in a block that the extended template doesn't have
a block by that name,
is not sent to the browser (is not rendered). See also the variable
block.super, which allows
you to add to rather than replace content from the extended template.
Also see the "include" tag, but if you use it very much, you probably
don't understand extends.
Bill
> --
>
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to
django...@googlegroups.com.
> To unsubscribe from this group, send email to
django-users...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=.
>
>
>