Per Einar Ellefsen wrote:
Hi,

So I decided to try and get that one working. I did :)
It works ok for 404.html... It might create some problems if somebody inserts meta tags into the source HTML that we're already setting in the resulting HTML (by the way--wouldn't it be better to set the description to the current abstract instead of the same for all pages?), as those would be duplicated.


I copy the headers verbatim. It's easier that way, because I didn't have to invent complicated datastructures that aren't really necessary anyway.

Easier yes, but it won't work nicely. The <head> must be parsed completely and sent to the templates as a hash (array?) with elements of the head (excluding title and description), so the templates will be able to set the default for those headers that weren't set, but not duplicate the existing headers e.g. consider <meta name="keywords" content="...">, which can be set in the source html header.


probably something like this:

  headers => {
      meta => [
         'keywords'    => 'the content part',
         'description' => '...'
      ],
      base => ...
  }

It's not easy though, since different tags have different elements, so the templates should be aware of that.

But if templates never receive raw HTML, later on we can extend POD to provide similar headers.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to