Dustin Frazier wrote:
If I try to reference the variable 'section' within a page that uses the
'page' wrapper, it's not defined.

Hi Dustin,

Wrappers work "inside-out". The inner content is processed first followed by the outer wrapper template. So variables set in the main template are visible in the wrapper, but not the other way round.

The best general solution to this is to use a PRE_PROCESS template as Cees suggests. In answer to your question, yes, the template variable is accessible right from the start so it's fine to put your "IF template.name.match(...)" code in there.

HTH
A


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to