view MoinMoin/macro/ @ 1341:f4558797325a

new page.link_to_raw function, use more page.link_to(_raw) instead of lowlevel wikiutil.link_tag, use more query dicts instead of strs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Aug 2006 15:51:08 +0200
parents 4eb66637ccd0
children e36313297589
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
    MoinMoin - Create an action link

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

import re

Dependencies = ["language"]
from MoinMoin import wikiutil

def execute(self, args):
    # Get list of template pages readable by current user
    filter = re.compile(self.request.cfg.page_template_regex, re.UNICODE).search
    templates = self.request.rootpage.getPageList(filter=filter)
    result = []
    if templates:
        page =
        # send list of template pages
        for template in templates:
            result.append(page.link_to(self.request, template, querystr={'action': 'edit', 'template': template}))
    return ''.join(result)