Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5d5a53cfb1fc82fdbf1e3e9ea3253fa5 > files > 83

python-mako-0.2.4-1mdv2010.0.noarch.rpm

## toc.myt - prints table of contents listings given toc.TOCElement strucures

<%def name="toc(toc, paged, extension)">
	<div class="topnav">

	<a name="full_index"></a>
	<h3>Table of Contents</h3>
	
	${printtoc(root=toc,paged=paged, extension=extension, current=None,children=True,anchor_toplevel=False)}

	</div>
</%def>


<%def name="printtoc(root, paged, extension, current=None, children=True, anchor_toplevel=False)">
    <ul>
    % for item in root.children:
        <li><A style="${item is current and "font-weight:bold;" or "" }" href="${item.get_link(extension=extension,anchor=anchor_toplevel, usefilename=paged) }">${item.description}</a></li>
        
        % if children:
            ${printtoc(item, current=current, children=True,anchor_toplevel=True, paged=paged, extension=extension)}
        % endif
    % endfor
    </ul>
</%def>