@require(project)
@def format_level(project, cpage_name, parent_name, level): @( subproject = project.subprojects.get(cpage_name) if (subproject): project = subproject page = project.tree.root else: page = project.tree.get_pages()[cpage_name] prefix = project.extensions[page.extension_name].formatter.get_output_folder(page) page_link, attrs = page.link.get_link(project.app.link_resolver) unique_ref = '%s-%s-%s' % (page.extension_name, page.project_name, page_link) if prefix: page_link = "%s/%s" % (prefix, page_link) name = parent_name + '-' + str(level) actual_level = name.count('-') if actual_level % 2 == 0: sidenav_panel_extra_class = "sidenav-panel-even" else: sidenav_panel_extra_class = "sidenav-panel-odd" )
@if page.subpages: @end

#### @if page.subpages: @end @page.get_title()!e

@if page.subpages: @end
@( level = 0 ext = project.extensions[page.extension_name] subpages = ext.get_subpages_sorted(project.tree.get_pages(), page) ) @for cpage_name in subpages: @format_level(project, cpage_name, name, level) @(level += 1) @end
@end @( level=0 ext = project.extensions[project.tree.root.extension_name] subpages = ext.get_subpages_sorted(project.tree.get_pages(), project.tree.root) ) @for cpage_name in subpages: @format_level(project, cpage_name, "main", level) @(level += 1) @end