# toc.myt - prints full table of contents listings given toc.TOCElement strucures
<%def name="toc(toc, paged=True, extension='html')">
Table of Contents
${printtoc(root=toc,current=None,full=True,children=True,anchor_toplevel=False, paged=paged)}
%def>
<%def name="printtoc(root,current=None,full=False,children=True,anchor_toplevel=False,extension='html',paged=True)">
% for item in root.children:
- ${item.description}
% if children:
${printtoc(item, current=current, full=full,children=True,anchor_toplevel=True, paged=paged)}
% endif
% endfor
%def>