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

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" 

regards, Kornel

PHPTAL mailing list

Reply via email to