List Info

Thread: nested wrappers and variables




nested wrappers and variables
user name
2006-06-07 20:28:01
I have a common page template for all pages that starts like
this:

base:
[% IF template.name.match('/') -%]
  [%- DEFAULT section = template.name.replace('/.*','')
-%]
[% END -%]
...

I then have a second, more specific template that is based
on this one:

page:
[% WRAPPER base %]
...

If I try to reference the variable 'section' within a page
that uses the
'page' wrapper, it's not defined.  Is there something
special I need to do
from one wrapper template or the other to make this work?  I
don't want to
duplicate all of the stuff at the top of my base template
within the page
template (code sharing being the whole point of having one
based on the
other).

Thanks!

Dustin



_______________________________________________
templates mailing list
templatestemplate-toolkit.org
http://lists.template-toolkit.org/mailman/listinfo/t
emplates
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )