\n"")
if heading:
out.write(""
%s
\n"" % heading)
+ if params['title_index']:
+ out.write('
')
for pagename in pagenames:
if params['title_index']:
li_class = pagename.startswith(current_page) and ' class=""active""' or ''
@@ -167,7 +169,8 @@
all_pages = list(WikiSystem(self.env).get_pages(prefix))
if all_pages:
all_pages.sort()
- out.write('')
+ if not params['title_index']:
+ out.write('')
for page in all_pages:
page_text, _ = get_page_text(page)
@@ -178,7 +181,8 @@
title = re.sub('<[^>]*>','', title) # Strip all tags
header = ': ' + wiki_to_oneliner(title, self.env)
out.write('- %s %s
\n' % (li_class, self.env.href.wiki(page), page, header))
- out.write('
')
+ if not params['title_index']:
+ out.write('
')
else :
out.write('Error: No page matching %s found
' % prefix)
else:
@@ -188,6 +192,8 @@
formatter.format(current_page, page, page_text, out, params['min_depth'], params['max_depth'])
else:
out.write('Error: Page %s does not exist
' % pagename)
+ if params['title_index']:
+ out.write('
')
if not inline:
out.write(""
\n"")
return out.getvalue()
}}}
This is the fix I'm running on my own trac installation." defect closed normal TocMacro normal fixed Ryan Witt 0.11