Re: [htmltmpl] RFC: Template Tag Attributes
Brought to you by:
samtregar
From: Sam T. <sa...@tr...> - 2004-06-02 17:10:10
|
On Wed, 2 Jun 2004, Timm Murray wrote: > I have a project which involves changing our current pages using SSI > #includes into using an HTML::Template-based solution instead. The > question of how to search these templates came up, and I've suggested using > htdig:// with a filter program that will convert the templates into text > for indexing. I suggest you use a web-spider to index your site, which would of course run HTML::Template to produce output. That way you index everything the end-user sees, not just the static parts of the page. I don't know for sure but I bet htdig:// comes with a web spider. If not 'wget -r' is handy in a pinch! > Inevitably, there will be certain pages using TMPL_INCLUDE tags. I imagine > that most of these will contain data that will not want to be searched for, > such as footers, and therefore my filter program can simply ignore > them. However, I don't feel safe in making the blanket assumption that > /all/ included files don't need to be searchable. Now you've lost me. There's lots of stuff in an HTML page that shouldn't be searched for. Stuff like headers and footers in includes is just the tip of the ice-berg. Why obsess over this? > Is it possible to add a flexible attribute system to the current > HTML::Template design? I'm thinking of something like this: > > <TMPL_INCLUDE NAME="file.txt" SEARCHABLE="no"> I'd write that: <TMPL_INCLUDE NAME="file.txt"><!-- SEARCHABLE="no" --> That way HTML::Template does its job, same as always, and your code can key on the special comment. > I'm sure it can be done with a filter, but frankly, I think that's a > cop-out solution, being that the current filter mechanism does not have a > way to hook into HTML::Template's parser. Why would you need to hook into the parser to implement this? -sam |