[Templates] Dual pass template processing

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Wed Jan 30 12:07:02 GMT 2008


Mark Knoop wrote:
>> On Jan 29, 2008 3:39 PM, Mark Knoop <mark at rawcane.net> wrote:
>>> One of the
>>> features of my system is that one set of tags gets processed when the 
>>> site
>>> is built ie the pages are prerendered to an extent. The rest of the tags
>>> then get processed at request time by my CGI script.
>> The documentation templates that come with TT demonstrate this.  You
>> basically just adjust the tags to something different for each pass.
>> http://tt2.org/docs/faq/index.html#section_If_I_m_using_TT_to_write_out_a_TT_template_is_there_a_good_way_to_escape_and_
>>
>> You can set TAGS from outside the template when you create your Template 
>> object.
>>
>> - Perrin
>>
> 
> Great - I had thought this was probably something obvious and well-catered 
> for but am just starting to find my way around. The TAG_STYLE option that 
> Stuart mentioned looks neater though it may not be as clear which tags are 
> which - this way is more logical but not as pretty perhaps. I'll have a 
> play.

If you explicitly set your tags to [-pass-1-tag-%  and [-pass-2-tag-% it
should be pretty obvious! :)

<http://tt2.org/docs/manual/Config.html#section_START_TAG_END_TAG>

Cheers, Dave



More information about the templates mailing list