Attachment 'autotoc.patch'
Download 1 --- ./moin-1.5.7/MoinMoin/Page.py-orig 2006-11-04 00:14:37.000000000 +1300
2 +++ Page.py 2007-05-02 12:02:24.000000000 +1200
3 @@ -1249,6 +1249,16 @@
4 elif not request.user.may.read(self.page_name):
5 request.write("<strong>%s</strong><br>" % _("You are not allowed to view this page."))
6 else:
7 + # if the config file has the "auto_toc" setting, insert a table
8 + # of contents if the page has any headings
9 + want_toc = False
10 + try:
11 + want_toc = self.cfg.auto_toc
12 + except:
13 + pass
14 + if want_toc and pi_format == 'wiki' and not send_missing_page and (body.find("\n= ") >= 0 or body.find("\n== ") >= 0):
15 + body = "[[TableOfContents(3)]]\n" + body
16 +
17 # parse the text and send the page content
18 self.send_page_content(request, Parser, body,
19 format_args=pi_formatargs,
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.