<tal:master define="level options/level|python:0;
                    children options/children | nothing;
                    bottomLevel options/bottomLevel | nothing;"
            i18n:domain="plone">

<metal:main define-macro="nav_main">
<tal:navitem repeat="node children">
<li tal:define="show_children   node/show_children;
                children        node/children;
                item_url        node/getURL;
                item_remote_url node/getRemoteUrl;
                use_remote_url  node/useRemoteUrl | nothing;
                item_icon       nocall:node/item_icon;
                item_type       node/portal_type;
                is_current      node/currentItem;
                is_in_path      node/currentParent;
                li_class        python:is_current and ' navTreeCurrentNode' or '';
                li_extr_class   python:is_in_path and ' navTreeItemInPath' or '';
                li_folder_class python:show_children and ' navTreeFolderish' or '';
                normalizeString nocall: context/plone_utils/normalizeString;"
    tal:attributes="class string:navTreeItem visualNoMarker${li_class}${li_extr_class}${li_folder_class} section-${node/normalized_id}"
    tal:condition="python:bottomLevel &lt;= 0 or level &lt;= bottomLevel">

    <tal:level define="item_class string:state-${node/normalized_review_state};
                       item_type_class python:'contenttype-' + normalizeString(item_type);
                       item_class python:is_current and item_class + ' navTreeCurrentItem' or item_class;">


        <a tal:attributes="href python:use_remote_url and item_remote_url or item_url;
                           title node/Description;
                           class string:$item_class${li_class}${li_extr_class}${li_folder_class} $item_type_class">
            <img tal:replace="structure item_icon/html_tag" />
            <span tal:content="node/Title">Selected Item Title</span>
        </a>

        <tal:children condition="python: len(children) > 0">
            <ul tal:attributes="class python:'navTree navTreeLevel'+str(level)"
                tal:condition="python: len(children) > 0 and show_children and bottomLevel and level < bottomLevel or True">
                <span tal:replace="structure python:view.recurse(children=children, level=level+1, bottomLevel=bottomLevel)" />
            </ul>
        </tal:children>

    </tal:level>
</li>
</tal:navitem>
</metal:main>
</tal:master>
