view MoinMoin/macro/ @ 3573:124d0ef138aa

change page_*_regex processing, see docs/CHANGES (fixes Xapian category search for non-english)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 10 May 2008 23:37:00 +0200
parents 09657fbd4aa2
children 544e5091d940
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - Create an action link

    @copyright: 2004 Johannes Berg <>
    @license: GNU GPL, see COPYING for details.

Dependencies = ["language"]
def macro_EditTemplates(macro):
    result = ''
    # we don't want to spend much CPU for spiders requesting nonexisting pages
    if not macro.request.isSpiderAgent:
        # Get list of template pages readable by current user
        filterfn =
        templates = macro.request.rootpage.getPageList(filter=filterfn)
        result = []
        if templates:
            page =
            # send list of template pages
            for template in templates:
                result.append(page.link_to(macro.request, template, querystr={'action': 'edit', 'template': template}))
        result = ''.join(result)
    return result