[PHPTAL] embedded repeats

Joshua Paine lists at fairsky.us
Tue Apr 25 20:28:03 CEST 2006


This kind of thing can work just fine--I do it often. I think the 
problem is with your something|null contruction, as null isn't a keyword 
in PHPTAL, and I don't think you can chain expressions in tal:repeat anyway.

Try this instead:
<ul>
   <li tal:repeat="item setup"><a tal:attributes="href
item/link_location; id item/class | default" 
tal:content="item/link_name" tal:condition="item/hidden"></a>
     <ul tal:condition="item/setup2 | nothing">
       <li tal:repeat="item2 item/setup2"><a tal:attributes="href
item2/link_location; id item2/class | default" 
tal:content="item2/link_name" tal:condition="item2/hidden"></a></li>
     </ul>
</ul>

-- 
Joshua Paine
Chief Tower Builder
LetterBlock Software
http://letterblock.com/



More information about the PHPTAL mailing list