source: products/quintagroup.dropdownmenu/trunk/quintagroup/dropdownmenu/browser/templates/sections_recurse.pt @ 2657

Last change on this file since 2657 was 2657, checked in by fenix, 10 years ago

fixed "show icons" functionality for plone4

  • Property svn:eol-style set to native
File size: 2.2 KB
Line 
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    tal:attributes="class string:globalSectionsItem visualNoMarker${li_class}${li_extr_class}${li_folder_class}">
21
22    <tal:level define="show_icons view/conf/show_icons;
23                       item_class string:state-${node/normalized_review_state}">
24
25    <a tal:attributes="href python:item_url;
26                       title node/Description;
27                       class string:$item_class${li_class}${li_extr_class}${li_folder_class}">
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>
32    </a>
33
34    <ul tal:attributes="class python:'globalSections globalSectionsLevel'+str(level)"
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>
Note: See TracBrowser for help on using the repository browser.