How to get title of a DTML Document?
Sorry if this is a basic newbie question, but I've sifted through the docs and haven't been able to find the answer. 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. Any hints? Thanks in advance for any help.
On 23-Nov-1999 Art Hampton wrote:
Sorry if this is a basic newbie question, but I've sifted through the docs and haven't been able to find the answer.
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.
<!--#var title_or_id--> -- M. Adam Kendall | mak@kha0s.org | "There's never enough time to do http://kha0s.org | all the nothing you want." | --Bill Watterson (Calvin and Hobbes)
M. Adam Kendall wrote:
On 23-Nov-1999 Art Hampton wrote:
Sorry if this is a basic newbie question, but I've sifted through the docs and haven't been able to find the answer.
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.
<!--#var title_or_id-->
That gets the title or id of index_html. I need the title of a different document.
----- 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
Kevin Dangoor wrote: [snip]
standard_html_header (DTML Method): <html><body><p>Blah blah</p> <dtml-var other_header>
other_header (DTML Document): <p><dtml-var title></p>
This is almost what I'm trying to do. The only thing different is in the standard header: standard_html_header (DTML Method): <html><body><p>Blah blah</p> <H1>other_header's title is: <dtml-magical-doohicky other_header.title></H1> <dtml-var other_header> This would result in: <html><body><p>Blah blah</p> <H1>other_header's title is: other_header</H1> <p>other_header</p> What, if anything, can I replace the dtml-magical-doohicky tag with? My goal in all of this is to have a small table that gets its header from the title of a DTML Document, and then displays the DTML Document as its table data. By approaching it this way, people who maintain the folders beneath this won't have to worry about formatting, and I won't have to update the formatting in 50 subfolders if it gets changed. So if anyone has any suggestions that accomplish this goal, I'm listening. Thanks again for your help.
participants (3)
-
Art Hampton -
Kevin Dangoor -
M. Adam Kendall