Attachment 'CategorySearch.py'

Download

   1 """
   2     CategorySearch: return all pages in a category
   3 
   4     Usage:
   5 
   6         [[CategorySearch(Homepage)]]
   7         
   8         returns all pages in category CategoryHomepage
   9 
  10     @copyright: 2007 by MoinMoin:ChrisVigelius
  11     @license: GNU GPL, see COPYING for details.
  12 """
  13 
  14 from MoinMoin.search.queryparser import CategorySearch
  15 from MoinMoin.search.builtin import Search
  16 
  17 Dependencies = ["pages"]
  18 
  19 def execute(macro, args):
  20     request = macro.request
  21     query = CategorySearch(args, False, True)
  22     results = Search(request = request, query = query).run()
  23     return results.pageList(request, macro.formatter, paging=False)
  24     

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] (2007-08-21 10:51:58, 0.6 KB) [[attachment:CategorySearch.py]]
 All files | Selected Files: delete move to page copy to page

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