Le vendredi 08 août 2008 à 17:24 +0100, Kornel Lesiński a écrit :

> On 08-08-2008 at 17:18:31 Guillaume Lecanu <[EMAIL PROTECTED]> wrote:
> 
> > But all the structure is stored in DB, so I don't know in advance if one
> > menu have 1, 2, or 10 childrens, and I don't know if a children is a
> > submenu.
> >
> > I know how to do that in PHP without PHPTAL, but how is it possible to
> > do that kind of XHTML code with PHPTAL ?
> 
> Of course. You can use macros called recursively:
> 
> <ul metal:define-macro="list" tal:condition="list">
>       <li tal:repeat="item list">...
>               <tal:block metal:use-macro="list" tal:define="list 
> item/sublist" />
>       </li>
> </ul>

Interresting, I'll try this.


Thanks Kornel & Iván

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to