1. Macros
    1. Search macros
    2. Navigation
    3. System information
    4. Others
    5. Writing your own macro


Macros allow the insertion of system features into normal wiki pages; the only thing that makes those pages special is that they contain macros. If you edit pages like RecentChanges or SystemInfo, you'll see what that means.

For more information on the possible markup, see HelpOnEditing.

Search macros

MoinMoin use now a new search engine, that lets your make sophisticated searches using both the interactive search box or any of the search macros. For more help, see HelpOnSearching.





create a search box on the page, which search the page titles

See FindPage


create a search box on the page, which search the page contents

See FindPage


print a list of pages whose content matches the current page title (like clicking on the page title)

See the CategoryCategory page


print a list of pages whose content matches the search term

Search for powered:


directly go to the page you enter

See the FindPage


print a list of pages whose title matches the search term

See the HelpIndex






a list of recently edited pages

See RecentChanges


an index of all page titles

See TitleIndex


an index of all words in page titles

See WordIndex


list links to non-existent pages

See WantedPages


list pages no other page links to

See OrphanedPages


list pages that were not edited for the longest time

See AbandonedPages


a link to a random page



links to a number of random pages

Two random pages:


display a local table of contents, possibly limited to a maximal depth

See above


macro to insert anchors into a page



macro to list all of a pages' children

See start of this page


quick navigation to siblings of a page

See /MailTo


creates a link to toggle between slide show and wiki mode, and a link to start the slide show

See HelpOnSlideShows


displays first/prev/next/last links

See HelpOnSlideShows


displays number of attachments for current page

See HelpOnActions/AttachFile


displays number of attachments for page

See HelpOnActions/AttachFile


displays list of attachments for current page

See HelpOnActions/AttachFile


displays list of attachments for page

See HelpOnActions/AttachFile

System information





a list of all known InterWiki names



info on the wiki, the python interpreter and the host system



current page count

588 pages


list the sizes of all pages

See PageSize


shows statistical charts (currently defined types: hitcounts, pagesize, useragents)

See EventStats and subpages


Information for system administrators

Needs admin rights.






display system icons

See HelpOnNavigation


display a user preferences dialog

See UserPreferences


insert a line break

1st line
2nd line


Select a random quote from the given page, or from FortuneCookies if ommitted

Tip: you can add your favorite pages to your navibar. See your Quicklinks list in UserPreferences.


include contents of another page

for details see /Include


Add a footnote (the text cannot contain any wiki markup), or explicitely display collected footnotes when no args are given

See HelpOnPageCreation for an example


display a timestamp according to system settings



display a timestamp1 according to user settings

2018-03-20 11:43:00


loads I18N texts (mainly intended for use on Help pages)

"EditText" is translated to "EditText"


useful for intranet developer wikis, a means to view pydoc documentation, formatted via a XSLT stylesheet

See [WWW] http://twistedmatrix.com/wiki/python/TeudProject


protect your email address from spam bots

for details see /MailTo

Writing your own macro

Create a python file called MacroName.py located in your data/plugins/macro directory. Ensure it has a single method called execute(macro, arguments), which is the entry-point.

All Macro instances have a request member through which you can access the form parameters and other information related to user interaction.

execute() should use the formatter to construct valid markup for the current target format. In most cases this is HTML, so writing a macro which returns HTML will work in most cases but fail when formats like XML or text/plain are requested.

For example, your wiki page has the following line on it:


You could write a !MacroName.py file like this:

def execute(macro, args):
    return macro.formatter.text("I got these args from a macro %s: %s" %
    (str(macro), args))
  • 1

    "timestamp" can be empty (current time), a number of seconds since 1970 (unix timestamp), or a W3C time specification ("2002-01-23T12:34:56").