<% previousLevel = None %> % for k in chapterIndexes: <% chapter = chapters[k] %> % if chapter['title']: <% if chapter['level'] == 1: otag = "" etag = "" else: otag = etag = "" %> % if chapter['chapter'] == '7': ## Quick and dirty hack to split the summary in 2 columns ## TODO : implement a generic way split the summary
<% previousLevel = None %> % endif % if otag and previousLevel:
% endif
${otag}${chapter['chapter']}.${etag}
% for tab in range(1, chapter['level']):
% endfor ${otag}${chapter['title']}${etag} % for tab in range(1, chapter['level']):
% endfor
<% previousLevel = chapter['level'] %> % endif % endfor