1 | <tal:master define="level options/level|python:0; |
---|
2 | children options/children | nothing; |
---|
3 | plonefour view/is_plone_four" |
---|
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; |
---|
14 | li_class python:is_current and ' globalSectionsCurrentNode selected' or ''; |
---|
15 | li_extr_class python:is_in_path and ' globalSectionsItemInPath' or ''; |
---|
16 | li_extr_class python:(is_in_path and not is_current) and li_extr_class + ' selected' or li_extr_class; |
---|
17 | li_extr_class python:(not (is_in_path or is_current)) and li_extr_class + ' plain' or li_extr_class; |
---|
18 | li_folder_class python:show_children and ' globalSectionsFolderish' or ''; |
---|
19 | item_type node/normalized_portal_type | nothing; |
---|
20 | li_class string:globalSectionsItem visualNoMarker${li_class}${li_extr_class}${li_folder_class}" |
---|
21 | tal:attributes="class python:children and li_class+' hasChildrens' or li_class"> |
---|
22 | |
---|
23 | <tal:level define="show_icons view/conf/show_icons; |
---|
24 | item_class string:state-${node/normalized_review_state}"> |
---|
25 | |
---|
26 | <a tal:attributes="href python:item_url; |
---|
27 | title node/Description; |
---|
28 | class string:$item_class${li_class}${li_extr_class}${li_folder_class}"> |
---|
29 | <img tal:condition="python: show_icons and not plonefour" |
---|
30 | tal:replace="structure item_icon/html_tag | nothing" /> |
---|
31 | <span tal:content="node/Title" |
---|
32 | tal:attributes="class python: plonefour and show_icons and item_type and 'contenttype-'+ item_type or nothing">Selected Item Title</span> |
---|
33 | </a> |
---|
34 | |
---|
35 | <ul tal:attributes="class python:'globalSections globalSectionsLevel'+str(level)" |
---|
36 | tal:condition="python: len(children) > 0 and show_children"> |
---|
37 | <li tal:replace="structure python:view.recurse(children=children, level=level+1)"> |
---|
38 | SubMenu |
---|
39 | </li> |
---|
40 | </ul> |
---|
41 | </tal:level> |
---|
42 | |
---|
43 | </li> |
---|
44 | </tal:navitem> |
---|
45 | </metal:main> |
---|
46 | </tal:master> |
---|