<metal:main define-macro="nav_main">
<tal:navitem repeat="item children">
<li class="navTreeItem visualNoMarker"
    tal:define="parent_shows_children show_children|nothing;
                children item/children|nothing;
                cur_item item/currentItem;"
    tal:condition="python: (not item['no_display']) and (cur_item or parent_shows_children or children) and (bottomLevel &lt;= 0 or level &lt; bottomLevel-1)">

    <tal:level define="item_type_class     python: 'contenttype-' + normalizeString(item['portal_type']);
                       item_wf_state_class python: 'state-' + normalizeString(item['review_state']);
                       ">

    <div tal:attributes="class item_type_class">
        <a tal:condition="cur_item"
           tal:attributes="href python:test(item.get('getRemoteUrl') and item.get('Creator') != member.getId(), item.get('getRemoteUrl'), item.get('getURL'));
                           title item/Description|nothing;
                           class string:$item_wf_state_class navTreeCurrentItem visualIconPadding"
            tal:content="item/Title|nothing">
            Selected Item Title </a>
        <tal:children condition="python: parent_shows_children or children">
        <a tal:condition="not: cur_item"
           tal:attributes="href python:test(item.get('getRemoteUrl') and item.get('Creator') != member.getId(), item.get('getRemoteUrl'), item.get('getURL'));
                           title item/Description|nothing;
                           class string:$item_wf_state_class visualIconPadding;"
            tal:content="item/Title|nothing">
            Unselected Item Title </a>
        </tal:children>
    </div>

    <ul tal:attributes="class python:'navTree navTreeLevel'+str(level)"
        tal:define="show_children item/show_children| python:True;
                    level python:level+1;"
        tal:condition="python: (show_children or isNaviTree) and children">
        <metal:recurse use-macro="here/portlet_navtree_macro/macros/nav_main"/>
    </ul>
    </tal:level>
</li>
</tal:navitem>
</metal:main>
