This is why I love Template Toolkit
So I recently learnt about Template Toolkits META directive - I mean I've seen it scattered around here and there but never really seen it do much more than provide default page titles.
I have been annoyed at the inelegant workarounds I've had to use when organising a web app with a site wrapper template and keeping all the view control in the right templates rather than in either the controller or as special cases in the wrapper.
Today I finally sorted that.. yesterday I used the meta tag to add javascript and css links to the header part of the page from a template deep inside the body of the html and today I replaced a special case flag with a sub-template specified by the meta tag, which then contains the wrapped content - rather elegant.. AND it allowed me to solve the layout issues I had after I moved the app from bootstrap 1 to bootstrap 2
*edit*
... and today I learnt I didn't need the META tag and it would JustWork(TM) without it, and I'd only need it in pre-processed headers - I'll leave it as it is in case I want to switch to pre-processing later.. and I learnt that it's not that novel several of those on #TT channel of irc.perl.org have been doing it like this for ages :(
So it sounds like this META stuff is pretty much just setting globals, but globals in the magic template variable? Or is it more than that?
Woo - who knew! - really should read more of the documentation.
That's really useful - thanks
Petdance - in this case META was just setting a global, I'd only need it really if using PRE_PROCESS - I was muddled about the order of processing wrappers and thought I needed it.
Ranguard - you don't need the META keyword - templates are rendered before wrappers so this trick is widely used by several people on the #tt irc channel - I guess it's just you and me who didn't spot it sooner :)