On Thu, Jan 7, 2010 at 7:26 AM, E R <[email protected]> wrote: > Does TT have the capability to insert text at a remote location (as > opposed to the current location)? > > Example: suppose you have a template that looks like: > > <html> > <head> > [% INCLUDE header_stuff %] > </head> > <body> > ... > [% INCLUDE foo %] > ... > </body> > </html> > > and you want the macro foo to do the following: > > 1. emit some output at its location, and > 2. add some text to the definition of header_stuff >
Sounds like you want to use WRAPPERs. That way foo will be processed first. Set some variables (they have to be deep because WRAPPER localized vars) -- I use page.<var>, for example. Then headers_stuff will run and can look at what was set. I love those wrappers. -- Bill Moseley [email protected]
_______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
