[ZPT] Help referencing variables

Jon Bowlas me at jonbowlas.com
Thu Feb 3 10:04:48 EST 2005


I've sorted it with: python:path(string('here/$albumname/hasChildNodes'))

Thanks anyway

-----Original Message-----
From: zpt-bounces at zope.org [mailto:zpt-bounces at zope.org] On Behalf Of Jon
Bowlas
Sent: 03 February 2005 14:35
To: zpt at zope.org
Subject: [ZPT] Help referencing variables

I’m trying to create a list that displays all the folders and the children
contained within each folder however I cannot seem to get the variable
‘albumname’ that I’ve defined in the script below to output in the TALES
expressions as outlined below, can anybody help?

<ul>
  <li tal:repeat="item here/objectValues"><div
tal:content="item/getId"></div>
  <div tal:define="albumname here/getId;
                           haskids here/$(albumname)/hasChildNodes"> 
    <ul tal:condition="haskids">
              <li tal:repeat="childitem here/$(albumname)/objectValues"><div
tal:content="childitem/getId"></div>
              </li>
   </ul>
   </div>
   </li>
</ul>

Hope someone can help as I don’t know what I’m doing wrong.

Regards

Jon


_______________________________________________
ZPT mailing list
ZPT at zope.org
http://mail.zope.org/mailman/listinfo/zpt



More information about the ZPT mailing list