Can someone explain to me why in the following code the line starting with * outputs a null string and the line starting with ** outputs the correct id of the DTMLDocument object ? <dtml-var standard_html_header> <dtml-in expr="objectItems('DTML Document')" prefix="sequence"> *<dtml-var "sequence_item.id"><br/> **<dtml-var id><br/> </dtml-in> <dtml-var standard_html_footer> TIA __peppo
--On Donnerstag, 16. Oktober 2003 13:04 Uhr +0200 Giuseppe Bonelli <giuseppe.bonelli@tiscali.it> wrote:
Can someone explain to me why in the following code the line starting with * outputs a null string and the line starting with ** outputs the correct id of the DTMLDocument object ?
<dtml-var standard_html_header> <dtml-in expr="objectItems('DTML Document')" prefix="sequence"> *<dtml-var "sequence_item.id"><br/>
maybe because you haven't understand what the underscore namespace is about. Use <dtml-var "_['sequence-item'].id" > And btw. *never* access the ID of an object why with 'id'. You should *ever* use obj.getId(). -aj
Giuseppe Bonelli wrote:
Can someone explain to me why in the following code the line starting with * outputs a null string and the line starting with ** outputs the correct id of the DTMLDocument object ?
<dtml-var standard_html_header> <dtml-in expr="objectItems('DTML Document')" prefix="sequence"> *<dtml-var "sequence_item.id"><br/> **<dtml-var id><br/> </dtml-in> <dtml-var standard_html_footer>
Try with other prefix in order to avoid confusion: <dtml-var standard_html_header> <dtml-in expr="objectItems('DTML Document')" prefix="doc"> <dtml-var expr="doc_item.id"><br/> <dtml-var id><br/> </dtml-in> <dtml-var standard_html_footer> HTH -- //// (@ @) ---------------------------oOO----(_)----OOo------------------------ Los pecados de los tres mundos desapareceran conmigo. Alexis Roda - Universitat Rovira i Virgili - Reus, Tarragona (Spain) --------------------------------------------------------------------
Hi *<dtml-var "sequence_item.id"> When you use " " in dtml-var that is an expression. To access dtml sequence-item you must write it like this: <dtml-var "_['sequence-item'].id"> Dragos ----- Original Message ----- From: "Giuseppe Bonelli" <giuseppe.bonelli@tiscali.it> To: <zope@zope.org> Sent: Thursday, October 16, 2003 1:04 PM Subject: [Zope] DTML Document ids
Can someone explain to me why in the following code the line starting with * outputs a null string and the line starting with ** outputs the correct id of the DTMLDocument object ?
<dtml-var standard_html_header> <dtml-in expr="objectItems('DTML Document')" prefix="sequence"> *<dtml-var "sequence_item.id"><br/> **<dtml-var id><br/> </dtml-in> <dtml-var standard_html_footer>
TIA
__peppo
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Alexis Roda -
Andreas Jung -
Dragos Chirila -
Giuseppe Bonelli