Attachment 'macro-sendpage.diff'
Download 1 --- orig/MoinMoin/Page.py
2 +++ mod/MoinMoin/Page.py
3 @@ -388,6 +388,7 @@
4 # determine modes
5 print_mode = request.form.has_key('action') and request.form['action'][0] == 'print'
6 content_only = keywords.get('content_only', 0)
7 + content_id = keywords.get('content_id', 'content')
8 self.hilite_re = keywords.get('hilite_re', None)
9 if msg is None: msg = ""
10
11 @@ -576,7 +577,7 @@
12 from parser.plain import Parser
13
14 # start wiki content div
15 - request.write('<div id="content">\n')
16 + request.write('<div id="%s">\n' % content_id )
17
18 # new page?
19 if not self.exists() and self.default_formatter and not content_only:
20
21
22 --- orig/MoinMoin/macro/Include.py
23 +++ mod/MoinMoin/macro/Include.py
24 @@ -189,7 +189,7 @@
25 strfile = cStringIO.StringIO()
26 macro.request.redirect(strfile)
27 try:
28 - inc_page.send_page(macro.request, content_only=1)
29 + inc_page.send_page(macro.request, content_only=1, content_id="Include_%s" % wikiutil.quoteWikiname(inc_page.page_name) )
30 result.append(strfile.getvalue())
31 finally:
32 macro.request.redirect()
33
34
35 --- orig/MoinMoin/macro/RandomQuote.py
36 +++ mod/MoinMoin/macro/RandomQuote.py
37 @@ -48,7 +48,7 @@
38 page.set_raw_body(quote, 1)
39 out = cStringIO.StringIO()
40 macro.request.redirect(out)
41 - page.send_page(macro.request, content_only=1)
42 + page.send_page(macro.request, content_only=1, content_id="RandomQuote_%s" % wikiutil.quoteWikiname(page.page_name) )
43 quote = out.getvalue()
44 macro.request.redirect()
45
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.