Steve Dunn wrote:
> I would like to be able to build site maps and "section maps" which use these
> data but I would like to be able to continue to keep META data for an
> article, such as the title, in the same file as the content for
> maintainability purposes. i.e. I do not want to put all the article titles
> in some big hash in a global file.
I like to use a combination of both: a big hash primarily to store structural
information (e.g. which pages are in which sections, and so on) and also META
tags in each page template to augment this.
I use template.name to lookup my page data in the big sitemap hash, and then
I update it with any template.* metadata items. Something like this, in a
pre-processed config file:
[% page = sitemap.${template.name};
DEFAULT
page.title = template.title
page.author = template.author;
%]
This is sub-ideal because you have to know which META items may be defined
in the template. In TT3 you'll be able to call template.metadata to get a
hash of the META items.
HTH
A
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates