[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 | |
---|
[17] | 18 | <div> |
---|
[15] | 19 | <tal:block tal:repeat="item items"> |
---|
| 20 | <metal:item use-macro="context/portlet_menu/macros/item" /> |
---|
| 21 | </tal:block> |
---|
| 22 | </div> |
---|
[17] | 23 | <div tal:condition="python: menu.portal_type=='TaskMenu' and menu.getMoreLink()"> |
---|
| 24 | <a href="#" |
---|
[15] | 25 | tal:attributes="href string:${portal_url}/${menu/getMoreLink}" |
---|
| 26 | i18n:translate="box_morelink">More...</a> |
---|
| 27 | </div> |
---|
| 28 | |
---|
| 29 | </dd> |
---|
| 30 | </dl> |
---|
| 31 | </tal:menu> |
---|
| 32 | </div> |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | <metal:item define-macro="item" |
---|
| 36 | tal:define="level level | python: 1; |
---|
| 37 | isActive python: item.isActive(context, menu, level); |
---|
| 38 | isCurrent python: item.isCurrent(context, menu, level);"> |
---|
| 39 | <div class="navTreeItem navTree" tal:omit-tag="isPlone20" |
---|
| 40 | tal:attributes="class python: 'navTreeItem navTree ' |
---|
| 41 | + 'navTreeLevel' + str(indent) |
---|
| 42 | + test(isCurrent, ' currentNavItem navTreeCurrentItem', '');"> |
---|
| 43 | <a href="#" |
---|
| 44 | tal:define="target item/getTargetObject; |
---|
| 45 | icon python: target == portal and 'site_icon.gif' |
---|
| 46 | or target.getIcon()" |
---|
| 47 | tal:attributes="href item/getItemUrl; |
---|
| 48 | title item/Description | item/Title; |
---|
| 49 | class python: 'navItem ' |
---|
| 50 | + 'navLevel' + str(indent) |
---|
| 51 | + test(isCurrent, ' currentNavItem', '');"> |
---|
| 52 | <img height="16" width="16" alt="" class="navIcon" |
---|
| 53 | tal:attributes="src string:${here/portal_url}/${icon}; |
---|
| 54 | title target/Type;" /> |
---|
| 55 | <span class="navItemText" |
---|
| 56 | tal:content="item/Title">Item title</span> |
---|
| 57 | </a> |
---|
| 58 | </div> |
---|
| 59 | <tal:subitems |
---|
| 60 | tal:define="indent python: indent + 1" |
---|
| 61 | tal:condition="isActive"> |
---|
| 62 | <tal:block tal:repeat="item python: item.getMenuItems(menu)"> |
---|
| 63 | <tal:item define="level python: level + 1"> |
---|
| 64 | <metal:item use-macro="context/portlet_menu/macros/item" /> |
---|
| 65 | </tal:item> |
---|
| 66 | </tal:block> |
---|
| 67 | </tal:subitems> |
---|
| 68 | </metal:item> |
---|
| 69 | |
---|
| 70 | |
---|
| 71 | </body> |
---|
| 72 | </html> |
---|