Dear List,

In most of my templates, I have a header and a footer templates that get
included from the main template, which I assume is a very common
scenario.  My problem is that <title> tag is in the header template and
it needs to change for each template.  There are two approaches that I
can currently use:

1. Put <title> tag into main template.  This works, but I do not believe
   having <title> outside of <head> is correct HTML[1].

2. Set title from CGI script.  This is not very convenient and, in my
   mind, breaks the paradigm.

The best solution, in my mind, would be something like this:

----  template search_results.tmpl  ----
<TMPL_SET NAME='TITLE' VALUE='Search Results'>
<!-- this is where title is used -->
<TMPL_INCLUDE NAME="_header.tmpl">
<some_html_here>
<TMPL_INCLUDE NAME="_footer.tmpl">
----  end of template  ----

Questions:

1. Is this feasible to implement?
2. Is such feature compatible with HTML::Template philosophy?
3. (Bonus question) is there another approach besides the two above that
   I can use right now?

Thank you,

  - Dmitri.

1. http://www.w3.org/TR/html401/struct/global.html#h-7.4.2




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to