view MoinMoin/macro/ @ 1529:76b4d2324d25

MoinMoin should not record the homepage links as pagelinks, fixes MoinMoinBugs/PageLinksIncludeUnrelatedLinks.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Tue, 05 Sep 2006 00:29:59 +0200
parents f4558797325a
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)