I've been working for a while on a system that will help me manage my web site, and I've become convinced that I need two pass template parsing. I would appreciate either people telling why I don't need it, or help on how to do this using Cheetah.
Why do I think I need to parse my page templates in two passes? If in a webpage I want a list of links to other webpages - nothing unusual - I don't see how I can obtain this list without parsing all the pages once just to know what they are.
In other words, I can't do this:
for page_template in page_templates:
parse_and_export(page_template)
but I must do:
for page_template in page_templates:
parse_and_save_metadata(page_template)
for page_template in page_templates:
parse_and_export(page_template)
Right?
So my question is: how do I do this in Cheetah? My apologies if this is in the manual: I haven't found it so far.
One solution I actually implemented was to build my own system that reads text files consisting of metadata and content - the content is then passed to Cheetah in its namespace dictionary. But this a) duplicates something Cheetah already does, and b) does not allow me to use many interesting features of Cheetah.
-- JurieHorneman - 09 Oct 2002