[ZOPE] newbie question: getting title_or_id from calling document
Trevor Toenjes
zope@toenjes.com
Tue, 16 Oct 2001 08:37:44 -0400
> I don't think I've expressed the problem clearly enough. It's not the
> folder title we need, it's the title/ID of the document/method that
> includes the header(via "dtml-var standard_header") .
As I stated previously...
>>> DTML-docs are folderish and have their own properties that will be
>>> inherited
>>> by a method in the namespace
standard_header (a DTML_METHOD) will render the title the calling
myDTML_Document.
Keep it clean, and only call methods or scripts from a DTML_Doc.
A DTML_Document (called by another DTML_Doc) that includes <dtml-var title>
will render its own title, not the title of its calling DTML_Doc.
This means you can use Docs instead of folders to get a title.
try it.
My first Zope project, had me converting "most" of my DTML_Docs to
DTML_Methods once I understood these rules.
NOTE: You can get the ID of the method using the obscure <dtml-var
document_id>. If you still need the title of the method, then it should be
a DTML_Doc.
-Trevor