[Zope] How do I change the document title via DTML?

Chris Beaumont cbeaumon@msri.org
Mon, 10 Sep 2001 08:49:09 -0700


Hi HoYin,

I just do something like this at the very top of my 
standard_html_header, works like a charm...


<html>
<head>
<meta http-equiv=content-type content="text/html; charset=iso-8859-1">
<title>
<dtml-if realtitle>
<dtml-var realtitle capitalize>
<dtml-else>
<dtml-var title_or_id>
</dtml-if>
</title>
<dtml-if keywords>
<meta name="keywords" content="&dtml-keywords;">
</dtml-if>


and so on..
Hope that helps..

-Chris




>I have a DTMLDoc that calls a SQL Method to display the profile for 
>a user.  I want to be able to dynamically change the document's 
>title (before calling standard_html_header and the document itself, 
>both of which contains calls to title_or_id) so that the title shows 
>"Profile for user <<username from profile>>".  I've tried using 
>dtml-let, REQUEST.set (using dtml-call), as well as <dtml-var 
>standard_html_header title='blah blahb lah'>... all of which didn't 
>work.  Any advice?
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )