diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/breadcrumb.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/breadcrumb.xml index bdaf7fcc4df0b76f4ec3ec22af00310a6328fb14..09fc22c549ec67a87e8b78eecb8997e11261ce05 100644 --- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/breadcrumb.xml +++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web_widget_library/breadcrumb.xml @@ -48,9 +48,25 @@ <key> <string>_text</string> </key> <value> <string encoding="cdata"><![CDATA[ -<tal:block tal:repeat="b_item python: context.WebSite_getBreadcrumbItemList()">\n - > <a tal:attributes="href python: b_item[1].WebSite_getDocumentUrl()"\n - tal:content="python: b_item[0]"/>\n +<tal:block replace="nothing"><!--\n + This macro is recursive and display lists of lists to display the breadcrumb as a tree.\n + TODO: merge it with site map (similar code)\n +--></tal:block>\n +<tal:block metal:define-macro="renderBreadcrumbItem">\n + <ul tal:define="remaining_items remaining_items | nothing"\n + tal:condition="remaining_items">\n + <li tal:define="current_item python: remaining_items[0];\n + remaining_items python: remaining_items[1:]">\n + <a tal:attributes="href python: current_item[1].WebSite_getDocumentUrl()"\n + tal:content="python: current_item[0]"/>\n + <tal:block metal:use-macro="here/breadcrumb/macros/renderBreadcrumbItem"/>\n + </li>\n + </ul>\n +</tal:block>\n +\n +<!-- Initialize the recursive loop -->\n +<tal:block tal:define="remaining_items python: context.WebSite_getBreadcrumbItemList()">\n + <tal:block metal:use-macro="here/breadcrumb/macros/renderBreadcrumbItem"/>\n </tal:block> ]]></string> </value>