[1194] | 1 | <tal:master define="level options/level|python:0; |
---|
[2657] | 2 | children options/children | nothing; |
---|
| 3 | plonefour view/is_plone_four" |
---|
[1194] | 4 | i18n:domain="plone"> |
---|
| 5 | |
---|
| 6 | <metal:main define-macro="sections_main"> |
---|
| 7 | <tal:navitem repeat="node children"> |
---|
| 8 | <li tal:define="show_children node/show_children; |
---|
| 9 | children node/children; |
---|
| 10 | item_url node/getURL; |
---|
| 11 | item_icon node/item_icon; |
---|
| 12 | is_current node/currentItem; |
---|
| 13 | is_in_path node/currentParent; |
---|
[3058] | 14 | li_curr_class python:is_current and 'selected' or ''; |
---|
| 15 | li_extr_class python:(is_in_path and not is_current) and 'selected' or ''; |
---|
| 16 | li_extr_class python:(not (is_in_path or is_current)) and li_extr_class + 'plain' or li_extr_class; |
---|
[2699] | 17 | item_type node/normalized_portal_type | nothing; |
---|
[3058] | 18 | li_class string:${li_curr_class}${li_extr_class}; |
---|
| 19 | li_class python:children and li_class or li_class" |
---|
| 20 | tal:attributes="class string:$li_class"> |
---|
[1194] | 21 | |
---|
[2657] | 22 | <tal:level define="show_icons view/conf/show_icons; |
---|
[3058] | 23 | a_class python:children and 'hasChildrens' or ''"> |
---|
[2657] | 24 | |
---|
[1194] | 25 | <a tal:attributes="href python:item_url; |
---|
| 26 | title node/Description; |
---|
[3058] | 27 | class string:${a_class}"> |
---|
[2657] | 28 | <img tal:condition="python: show_icons and not plonefour" |
---|
| 29 | tal:replace="structure item_icon/html_tag | nothing" /> |
---|
| 30 | <span tal:content="node/Title" |
---|
| 31 | tal:attributes="class python: plonefour and show_icons and item_type and 'contenttype-'+ item_type or nothing">Selected Item Title</span> |
---|
[1194] | 32 | </a> |
---|
| 33 | |
---|
[3058] | 34 | <ul tal:attributes="class python:'globalSectionsLevel'+str(level)" |
---|
[1194] | 35 | tal:condition="python: len(children) > 0 and show_children"> |
---|
| 36 | <li tal:replace="structure python:view.recurse(children=children, level=level+1)"> |
---|
| 37 | SubMenu |
---|
| 38 | </li> |
---|
| 39 | </ul> |
---|
| 40 | </tal:level> |
---|
| 41 | |
---|
| 42 | </li> |
---|
| 43 | </tal:navitem> |
---|
| 44 | </metal:main> |
---|
| 45 | </tal:master> |
---|