[15] | 1 | <html xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
| 2 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
| 3 | i18n:domain="plone"> |
---|
| 4 | <body> |
---|
| 5 | |
---|
| 6 | <div metal:define-macro="portlet"> |
---|
| 7 | <tal:menu repeat="menu context/selectMenus"> |
---|
| 8 | <dl class="portlet" |
---|
| 9 | tal:define="items menu/getMenuItems" |
---|
| 10 | tal:condition="items"> |
---|
| 11 | |
---|
| 12 | <dt class="portletHeader" i18n:translate="" tal:content="menu/Title">menu</dt> |
---|
| 13 | |
---|
| 14 | <dd class="portletItemLast" |
---|
| 15 | tal:define="indent python: 1; |
---|
| 16 | isPlone20 python: True"> |
---|
| 17 | |
---|
| 18 | <div class="portletContent odd" id="portlet-navigation-tree"> |
---|
| 19 | <tal:block tal:repeat="item items"> |
---|
| 20 | <metal:item use-macro="context/portlet_menu/macros/item" /> |
---|
| 21 | </tal:block> |
---|
| 22 | </div> |
---|
| 23 | <div class="portletContent odd" style="padding-top: 0" |
---|
| 24 | tal:condition="python: menu.portal_type=='TaskMenu' and menu.getMoreLink()"> |
---|
| 25 | <a href="#" class="portletMore" |
---|
| 26 | tal:attributes="href string:${portal_url}/${menu/getMoreLink}" |
---|
| 27 | i18n:translate="box_morelink">More...</a> |
---|
| 28 | </div> |
---|
| 29 | |
---|
| 30 | </dd> |
---|
| 31 | </dl> |
---|
| 32 | </tal:menu> |
---|
| 33 | </div> |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | <metal:item define-macro="item" |
---|
| 37 | tal:define="level level | python: 1; |
---|
| 38 | isActive python: item.isActive(context, menu, level); |
---|
| 39 | isCurrent python: item.isCurrent(context, menu, level);"> |
---|
| 40 | <div class="navTreeItem navTree" tal:omit-tag="isPlone20" |
---|
| 41 | tal:attributes="class python: 'navTreeItem navTree ' |
---|
| 42 | + 'navTreeLevel' + str(indent) |
---|
| 43 | + test(isCurrent, ' currentNavItem navTreeCurrentItem', '');"> |
---|
| 44 | <a href="#" |
---|
| 45 | tal:define="target item/getTargetObject; |
---|
| 46 | icon python: target == portal and 'site_icon.gif' |
---|
| 47 | or target.getIcon()" |
---|
| 48 | tal:attributes="href item/getItemUrl; |
---|
| 49 | title item/Description | item/Title; |
---|
| 50 | class python: 'navItem ' |
---|
| 51 | + 'navLevel' + str(indent) |
---|
| 52 | + test(isCurrent, ' currentNavItem', '');"> |
---|
| 53 | <img height="16" width="16" alt="" class="navIcon" |
---|
| 54 | tal:attributes="src string:${here/portal_url}/${icon}; |
---|
| 55 | title target/Type;" /> |
---|
| 56 | <span class="navItemText" |
---|
| 57 | tal:content="item/Title">Item title</span> |
---|
| 58 | </a> |
---|
| 59 | </div> |
---|
| 60 | <tal:subitems |
---|
| 61 | tal:define="indent python: indent + 1" |
---|
| 62 | tal:condition="isActive"> |
---|
| 63 | <tal:block tal:repeat="item python: item.getMenuItems(menu)"> |
---|
| 64 | <tal:item define="level python: level + 1"> |
---|
| 65 | <metal:item use-macro="context/portlet_menu/macros/item" /> |
---|
| 66 | </tal:item> |
---|
| 67 | </tal:block> |
---|
| 68 | </tal:subitems> |
---|
| 69 | </metal:item> |
---|
| 70 | |
---|
| 71 | |
---|
| 72 | </body> |
---|
| 73 | </html> |
---|