[ZOPE] newbie question: getting title_or_id from calling document
Mon, 15 Oct 2001 13:27:42 -0400
>From one Newbie to another...
DTML-methods inherit the properties of the calling container. In many
cases, this is the folder that is being rendered. So the index_html that is
called from the folder, takes on the properties, title, id, etc, from that
folder. This assumes that index_html is a method and not a Doc.
It took me a couple weeks using Zope to realize that the default folder
set-up that includes index_html as a document should seldom be used...
<read...never> (Actually I suggest that this should be removed from the
ZMI, because it trips up most newbies. Or at least give the option to
create index_html as a method.)
Most of the Zopistas have told me that DTML-Documents are bad.
In general you will mostly want to use Methods for everything that is an
object or part of a template.
DTML-Documents are good for just content. <read...text.>
And consider the emminent message from anyone saying "USE ZPT instead of
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org]On Behalf Of Simon
> Sent: Monday, October 15, 2001 1:05 PM
> To: email@example.com
> Subject: [ZOPE] newbie question: getting title_or_id from calling
> I'm trying to create a standard_header that when included in a document
> uses the calling documents namespace. So, if the standard_header was:
> <title><dtml-var title_or_id></title
> and the index_html document had as it's first line:
> <dtml-var standard_header>
> How can I make the standard header DTML document write the title/ID of
> index_html or any of the documetns that call/include it?.
> Apologies in advance if I'm being thick.
> Zope maillist - Zope@zope.org
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-dev )