[Zope] How to access id and title of document calling standard_html_header
Tim Hicks" <firstname.lastname@example.org
Mon, 4 Sep 2000 22:41:21 +0100
----- Original Message -----
From: "Dieter Maurer" <email@example.com>
To: "Tim Hicks" <firstname.lastname@example.org>
Sent: Monday, September 04, 2000 7:48 PM
Subject: Re: [Zope] How to access id and title of document calling
> Tim Hicks writes:
> > I have a standard_html_header that is inserted into Zclasses.
> > Zclasses have properties including meta_author ...
> > In standard_html_header, I use code such as <dtml-var
> > This works fine and the properties of
> > the *zclass* are inserted. However, if I put <dtml-var id> into
> > standard_html_header, I get the id of standard_html_header, *not*
> > the zclass.
> When I do this, I get the id of the Z class instance.
> It should be impossible to get the id of the *standard_html_header*,
> if this header is a DTML *method* (rather than document) as you
> told us in a different message.
> Because we see different things, we need to describe carefully,
> what we do. Apparently, we do not do the same.
> I have a folder-like ZClass, say ZC, and an instance of this class,
> ZC has a method, say M, using "standard_html_header".
> "standard_html_header" is a DMTL method (!) rendering "id".
> When I open "ZI/M", "standard_html_header" renders "ZI", i.e.
> ZI's id.
> The same happens, if "standard_html_header" is not in ZI but
> a ZC method.
> Now, it is your turn to describe precisely, what you are doing.
OK, I think that I am perhaps misusing zclasses then. Here is what I
I have a Folder that was created by using the 'Add new item' menu
within Zope. This folder is called 'Site'.
I have a Zclass called 'theatre_class' that has "Base classes ZObject,
_ZClass_for_CatalogAware, _ZClass_for_DTMLDocument". I have set the
zclass to have the following properties by creating a
'theatre_class_property' property sheet for it:
... amongst others.
Within the Folder 'Site', I have standard_html_header dtml-method that
is an edited version of the default one that is found in the root
folder of a Zope instance (if that is the right term). This
standard_html_header uses things code such as this:
<META NAME="description" CONTENT="<dtml-var meta_description>">
<META NAME="author" CONTENT="<dtml-var meta_author>">
When I use the standard_html_header in an instance of a zclass, the
appropriate property of the zclass is indeed inserted into it. See
Zclass instance has code such as:
<h1>This is an instance of my Theatre Zclass</h1>
However, if I try to put <dtml-var id> into the standard_html_header,
I get nothing, and if I use <dtml-var document_id>, I get
'standard_html_header' inserted into the document.
I hope I have made it clear what I am doing. It is certainly becoming
clear to me that I have got the wrong end of the stick a little with
Thanks for your help.