Attachment 'backlink.py'
Download 1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - Backlink Action
4
5 Lists all pages refering ("linking") to the current page.
6
7 XXX ToDo
8 Provide a translation for _('Pages linking to "%s"')
9
10 @copyright: 2007 by Oliver Siemoneit
11 @license: GNU GPL, see COPYING for details.
12 """
13
14 from MoinMoin import search
15
16 def execute(pagename, request):
17 _ = request.getText
18 needle = '"%s"' % pagename
19 # Search the pages and return the results
20 results = search.searchPages(request, needle, sort='page_name')
21 # Output results
22 request.emit_http_headers()
23 request.setContentLanguage(request.lang)
24 request.theme.send_title(_('Pages linking to "%s"') % (pagename), pagename=pagename)
25 request.write(request.formatter.startContent("content"))
26 request.write(results.pageList(request, request.formatter, paging=False))
27 request.write(request.formatter.endContent())
28 request.theme.send_footer(pagename)
29 request.theme.send_closing_html()
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.