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 | plone_view context/@@plone"> |
---|
9 | |
---|
10 | <metal:main define-macro="nav_main"> |
---|
11 | <tal:navitem repeat="node children"> |
---|
12 | <li class="navTreeItem visualNoMarker" |
---|
13 | tal:define="children node/children; |
---|
14 | item node/item; |
---|
15 | useView python:item.portal_type in viewActions; |
---|
16 | item_icon python:plone_view.getIcon(item); |
---|
17 | isFolderish item/is_folderish|nothing; |
---|
18 | default_page python:isFolderish and item.getObject().getProperty('default_page', '') or ''; |
---|
19 | itemUrl python:test(default_page, '%s/%s' % (item.getURL(), default_page), test(useView, item.getURL() + '/view', item.getURL())); |
---|
20 | linkRemote python:item.getRemoteUrl and item.Creator != member_id; |
---|
21 | isCurrent node/currentItem;" |
---|
22 | tal:condition="python: bottomLevel <= 0 or level < bottomLevel-1"> |
---|
23 | |
---|
24 | <tal:level define="item_wf_state_class python: 'state-' + normalizeString(item.review_state);"> |
---|
25 | |
---|
26 | |
---|
27 | <div tal:define="itemClass string:$item_wf_state_class; |
---|
28 | itemClass python:test(isCurrent, itemClass + ' navTreeCurrentItem', itemClass);"> |
---|
29 | |
---|
30 | <a tal:attributes="href python:test(linkRemote, item.getRemoteUrl, itemUrl); |
---|
31 | title item/Description; |
---|
32 | class string:$itemClass"> |
---|
33 | <img width="16" height="16" |
---|
34 | src="" alt="" |
---|
35 | tal:condition="item_icon/url" |
---|
36 | tal:attributes="src item_icon/url; |
---|
37 | alt item_icon/description; |
---|
38 | title item_icon/title; |
---|
39 | width item_icon/width; |
---|
40 | height item_icon/height;" /> |
---|
41 | <span tal:replace="item/Title">Selected Item Title</span> |
---|
42 | </a> |
---|
43 | |
---|
44 | </div> |
---|
45 | |
---|
46 | <ul tal:attributes="class python:'navTree navTreeLevel'+str(level)" |
---|
47 | tal:define="level python:level+1;" |
---|
48 | tal:condition="nocall:children"> |
---|
49 | <metal:recurse use-macro="here/portlet_navtree_macro/macros/nav_main"/> |
---|
50 | </ul> |
---|
51 | </tal:level> |
---|
52 | </li> |
---|
53 | </tal:navitem> |
---|
54 | </metal:main> |
---|
55 | </tal:master> |
---|