[Zope] Niewbie: DTML namespace
Dieter Maurer
dieter@handshake.de
Thu, 30 Jan 2003 21:22:29 +0100
Pino Silvestre wrote at 2003-1-30 13:57 +0000:
> I'm sorry for this (maybe) silly question, probably I didn't undestand the
> DTML namespace very well.
> I have this code quite similare to the guest book on the Zope Book example.
>
> <dtml-call "REQUEST.set('docRef', _[docId])">
> <p>
> <b>
> <dtml-with docRef>
> On <dtml-var "getProperty('date')" fmt="aCommon">
> <!-- <dtml-var bobobase_modification_time fmt="aCommon"> -->
> <dtml-var "getProperty('guest_name')" html_quote> says: <br>
> </dtml-with>
> <dtml-var docRef html_quote newline_to_br>
> </b>
> </p>
>
> docId is passed as parameter by a link (something like: <a
> href="Folder/MethodName?docId=entry>, where entry is the name of a DTML
> Document) My problem is the variable docRef doesn't reference the object. I
> can't nor access the properties neither the methods.
You need "_.getitem(docId)".
I suggest you read the "Name lookup" section of
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>
Dieter