[Zope] How to get title of a DTML Document?

Kevin Dangoor kid@kendermedia.com
Tue, 23 Nov 1999 17:40:11 -0500


----- Original Message -----
From: Art Hampton <arth@pacsg.css.mot.com>
To: <zope@zope.org>
Sent: Tuesday, November 23, 1999 4:50 PM
Subject: [Zope] How to get title of a DTML Document?


> I've got a document that I include in my standard_html_header.  That
> works fine.  But I'd like to also use the DTML Document's title in the
> header.
>
> I've hacked away at dozens of different possibilities, and none of them
> have worked.

It's possible that something that *should* be a DTML Method along the way is
actually a DTML Document. A DTML Method that does a <dtml-var title> will
display the title of the object that it was called on (Folder, Document,
whatever) via acqusition. A DTML Document has its own namespace (with a
property called title), so <dtml-var title> called from a Document will
print the Document's title. How 'bout this scenario:

standard_html_header (DTML Method):
<html><body><p>Blah blah</p>
<dtml-var other_header>

other_header (DTML Document):
<p><dtml-var title></p>

mydoc (DTML Document):

<dtml-var standard_html_header>
<p>Aloha</p>
<dtml-var standard_html_footer>


Calling mydoc will return:

<html><body><p>Blah blah</p>
<p>other_header</p>
<p>Aloha</p>
</body></html>

I think this HowTo is useful:
http://www.zope.org/Members/michel/HowTos/DTMLMethodsandDocsHowTo

Of course, it's always possible that none of this is the problem... But, it
reads like a namespace issue to me.

Kevin