Attachment 'LinksToThisPage.py'

Download

   1 """
   2     LinksToThisPage action
   3 
   4     Redirects to the full search using the linkto: syntax
   5     to find pages that link to the current page (a.k.a. "backlinks").
   6 
   7     @copyright: 2009 Stefan Simroth <stefan.simroth@empinia.org>
   8 
   9     @license: GNU GPL, to be found at http://www.gnu.org/licenses/gpl.html
  10 """
  11 
  12 from MoinMoin.Page import Page
  13 
  14 def execute(pagename, request):
  15    url = Page(request, pagename).url(request, {'action': 'fullsearch', 'context': '180', 'value': 'linkto:"'+pagename+'"'})
  16    request.http_redirect(url)

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.
  • [get | view] (2009-05-18 18:15:27, 0.5 KB) [[attachment:LinksToThisPage.py]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.