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

Last change on this file since 3219 was 3219, checked in by zidane, 13 years ago

add first and last element for section

  • Property svn:eol-style set to native
File size: 2.3 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                is_first        repeat/node/start;
15                is_last         repeat/node/end;
16                li_curr_class   python:is_current and 'selected' or '';
17                li_extr_class   python:(is_in_path and not is_current) and 'selected' or '';
18                li_extr_class   python:is_first and 'ddmisfirst '+li_extr_class or li_extr_class;
19                li_extr_class   python:is_last and 'ddmislast '+li_extr_class or li_extr_class;
20                li_extr_class   python:(not (is_in_path or is_current)) and li_extr_class + 'plain' or li_extr_class;
21                item_type       node/normalized_portal_type | nothing;
22                li_class string:${li_curr_class}${li_extr_class};
23                li_class python:children and li_class or li_class"
24    tal:attributes="class string:$li_class">
25
26    <tal:level define="show_icons view/conf/show_icons;
27                       a_class python:children and 'hasChildrens' or ''">
28
29    <a tal:attributes="href python:item_url;
30                       title node/Description;
31                       class string:${a_class}">
32        <img tal:condition="python: show_icons and not plonefour"
33             tal:replace="structure item_icon/html_tag | nothing" />
34        <span tal:content="node/Title"
35              tal:attributes="class python: plonefour and show_icons and item_type and 'contenttype-'+ item_type or nothing">Selected Item Title</span>
36    </a>
37
38    <ul tal:attributes="class python:'globalSectionsLevel'+str(level)"
39        tal:condition="python: len(children) > 0 and show_children">
40        <li tal:replace="structure python:view.recurse(children=children, level=level+1)">
41            SubMenu
42        </li>
43    </ul>
44    </tal:level>
45
46</li>
47</tal:navitem>
48</metal:main>
49</tal:master>
Note: See TracBrowser for help on using the repository browser.