source: products/qSiloGroup/trunk/skins/qSiloGroup/portlet_navtree_macro.pt @ 1

Last change on this file since 1 was 1, checked in by myroslav, 18 years ago

Building directory structure

  • 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                    bottomLevel options/bottomLevel | nothing;
4                    normalizeString nocall:context/plone_utils/normalizeString;
5                    viewActions here/portal_properties/site_properties/typesUseViewActionInListings|python:();
6                    member context/portal_membership/getAuthenticatedMember|nothing;
7                    member_id member/getId|nothing">
8
9<metal:main define-macro="nav_main">
10<tal:navitem repeat="node children">
11<li class="navTreeItem visualNoMarker"
12    tal:define="children   node/children;
13                item       node/item;
14                useView    python:item.portal_type in viewActions;
15                isFolderish item/is_folderish|nothing;
16                default_page python:isFolderish and item.getObject().getProperty('default_page', '') or '';
17                itemUrl python:test(default_page, '%s/%s' % (item.getURL(), default_page), test(useView, item.getURL() + '/view', item.getURL()));
18                linkRemote python:item.getRemoteUrl and item.Creator != member_id;
19                isCurrent  node/currentItem;"
20    tal:condition="python: bottomLevel &lt;= 0 or level &lt; bottomLevel-1">
21
22    <tal:level define="item_type_class     python: 'visualIcon contenttype-' + normalizeString(item.portal_type);
23                       item_wf_state_class python: 'state-' + normalizeString(item.review_state);">
24
25    <div tal:attributes="class item_type_class"
26         tal:define="itemClass string:$item_wf_state_class visualIconPadding;
27                     itemClass python:test(isCurrent, itemClass + ' navTreeCurrentItem', itemClass);">
28       
29        <a tal:attributes="href python:test(linkRemote, item.getRemoteUrl, itemUrl);
30                           title item/Description;
31                           class string:$itemClass"
32            tal:content="item/Title">
33            Selected Item Title
34        </a>
35       
36    </div>
37
38    <ul tal:attributes="class python:'navTree navTreeLevel'+str(level)"
39        tal:define="level python:level+1;"
40        tal:condition="nocall:children">
41        <metal:recurse use-macro="here/portlet_navtree_macro/macros/nav_main"/>
42    </ul>
43    </tal:level>
44</li>
45</tal:navitem>
46</metal:main>
47</tal:master>
Note: See TracBrowser for help on using the repository browser.