Return to Snippet

Revision: 5181
at February 17, 2008 10:03 by wackysalut

Initial Code
## base.html
    <!-- blah blah -->
<%def name="head()">
## Base definition (empty), override in subtemplates, and call
## ${parent.head()} somewhere in your definition.

## layout1_base.html
<%inherit file="base.html" />

<%def name="head()">
  <script type="text/javascript" src="/js/mootools.v1.11.js"></script>

## view for controller X
<%inherit file="layout1_base.html" />
<%def name="head()">
  <link rel="stylesheet" type="text/css" href="/css/woohoo.css" />

Initial URL

Initial Description
This allows you to collect some snippets of  or  tags from any subtemplate, and place them in the  of your base template, no matter how you skip some templates in the chain.

Note how you could skip the definition of head() in the layout1_base.html file.

Initial Title
Insert stuff into  from any subtemplate

Initial Tags

Initial Language