<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>HelpOnMacros</title></articleinfo><section><title>Macros</title><para>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 <ulink url="http://www.nnx.me/HelpOnMacros/RecentChanges#">RecentChanges</ulink> or <ulink url="http://www.nnx.me/HelpOnMacros/SystemInfo#">SystemInfo</ulink>, you'll see what that means. </para><para>For more information on the possible markup, see <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnEditing#">HelpOnEditing</ulink>. </para><section><title>Search macros</title><para><ulink url="http://www.nnx.me/HelpOnMacros/MoinMoin#">MoinMoin</ulink> now uses 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 <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnSearching#">HelpOnSearching</ulink>. </para><informaltable><tgroup cols="3"><colspec colname="col_0" colwidth="5*"/><colspec colname="col_1" colwidth="75*"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><emphasis role="strong">Macro</emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> <emphasis role="strong">Description</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Example</emphasis> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;AdvancedSearch&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> create an advanced search dialogue on the page </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/FindPage#">FindPage</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;TitleSearch&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> create a search box on the page, which search the page titles </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/FindPage#">FindPage</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;FullSearch&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> create a search box on the page, which search the page contents </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/FindPage#">FindPage</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;FullSearch()&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> print a list of pages whose content matches the current page title (like clicking on the page title) </para></entry><entry colsep="1" rowsep="1"><para> See the <ulink url="http://www.nnx.me/HelpOnMacros/CategoryCategory#">CategoryCategory</ulink> page </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;FullSearch(text)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> print a list of pages whose content matches the search term </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;FullSearchCached(text)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> Works like the <code>FullSearch</code> macro but caches the results statically. Use it if you prefer speed over an up-to-date result </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;GoTo&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> directly go to the page you enter </para></entry><entry colsep="1" rowsep="1"><para> See the <ulink url="http://www.nnx.me/HelpOnMacros/FindPage#">FindPage</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;PageList(Help)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> print a list of pages whose title matches the search term </para></entry><entry colsep="1" rowsep="1"><para> See the <ulink url="http://www.nnx.me/HelpOnMacros/HelpIndex#">HelpIndex</ulink> </para></entry></row></tbody></tgroup></informaltable></section><section><title>Navigation</title><informaltable><tgroup cols="3"><colspec colname="col_0" colwidth="5*"/><colspec colname="col_1" colwidth="75*"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><emphasis role="strong">Macro</emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> <emphasis role="strong">Description</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Example</emphasis> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;RecentChanges&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> a list of recently edited pages </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/RecentChanges#">RecentChanges</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;TitleIndex&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> an index of all page titles </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/TitleIndex#">TitleIndex</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;WordIndex&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> an index of all words in page titles </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/WordIndex#">WordIndex</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;WantedPages&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> list links to non-existent pages </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/WantedPages#">WantedPages</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;OrphanedPages&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> list pages no other page links to </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/OrphanedPages#">OrphanedPages</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;AbandonedPages&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> list pages that were not edited for the longest time </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/AbandonedPages#">AbandonedPages</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;RandomPage&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> a link to a random page </para></entry><entry colsep="1" rowsep="1"><para> <code>&lt;&lt;RandomPage&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;RandomPage(#)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> links to a number of random pages </para></entry><entry colsep="1" rowsep="1"><para> Two random pages: <code>&lt;&lt;RandomPage(2)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;TableOfContents([maxdepth])&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> display a local table of contents, possibly limited to a maximal depth </para></entry><entry colsep="1" rowsep="1"><para> See above </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Anchor(anchorname)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> macro to insert anchors into a page </para></entry><entry colsep="1" rowsep="1"><para> <anchor id="here"/>#here </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Navigation(children[,maxdepth])&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> macro to list all of a pages' children </para></entry><entry colsep="1" rowsep="1"><para> See start of this page </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Navigation(siblings[,maxdepth])&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> quick navigation to siblings of a page </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnMacros/MailTo#">/MailTo</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Navigation(slideshow)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> creates a link to toggle between slide show and wiki mode, and a link to start the slide show </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnSlideShows#">HelpOnSlideShows</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Navigation(slides)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> displays first/prev/next/last links </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnSlideShows#">HelpOnSlideShows</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;AttachInfo&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> displays number of attachments for current page </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnActions/AttachFile#">HelpOnActions/AttachFile</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;AttachInfo(page)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> displays number of attachments for page </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnActions/AttachFile#">HelpOnActions/AttachFile</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;AttachList(pagename,mimetype)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> displays list of attachments </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnActions/AttachFile#">HelpOnActions/AttachFile</ulink> </para></entry></row></tbody></tgroup></informaltable></section><section><title>System information</title><informaltable><tgroup cols="3"><colspec colname="col_0" colwidth="5*"/><colspec colname="col_1" colwidth="75*"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><emphasis role="strong">Macro</emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> <emphasis role="strong">Description</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Example</emphasis> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;InterWiki&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> a list of all known <ulink url="http://www.nnx.me/HelpOnMacros/InterWiki#">InterWiki</ulink> names </para></entry><entry colsep="1" rowsep="1"><para> <ulink url="http://www.nnx.me/HelpOnMacros/InterWiki#">InterWiki</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;SystemInfo&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> info on the wiki, the python interpreter and the host system </para></entry><entry colsep="1" rowsep="1"><para> <ulink url="http://www.nnx.me/HelpOnMacros/SystemInfo#">SystemInfo</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;PageCount(exists)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> current page count. If <code>exists</code> is supplied as an argument, only existing pages will be shown. </para></entry><entry colsep="1" rowsep="1"><para> <code>&lt;&lt;PageCount&gt;&gt; pages</code> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;PageSize&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> list the sizes of all pages </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/PageSize#">PageSize</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;StatsChart(type)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> shows statistical charts (currently defined types: hitcounts, pagesize, useragents, languages) </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/EventStats#">EventStats</ulink> and subpages </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;SystemAdmin&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> Information for system administrators </para></entry><entry colsep="1" rowsep="1"><para> You need to be superuser to call this macro </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;EditedSystemPages&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> A list of system pages that were modified </para></entry><entry colsep="1" rowsep="1"><para> <code>&lt;&lt;EditedSystemPages&gt;&gt;</code> </para></entry></row></tbody></tgroup></informaltable></section><section><title>Others</title><informaltable><tgroup cols="3"><colspec colname="col_0" colwidth="5*"/><colspec colname="col_1" colwidth="75*"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><emphasis role="strong">Macro</emphasis> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> <emphasis role="strong">Description</emphasis> </para></entry><entry colsep="1" rowsep="1"><para><emphasis role="strong">Example</emphasis> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Action(action [,text])&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para>links to page with valid action, optional text could be used as alias. (action names are case sensitive)</para></entry><entry colsep="1" rowsep="1"><para>  e.g. <code>&lt;&lt;Action(print, Print this page)&gt;&gt;</code>, <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnMacros?action=print">Print this page</ulink></para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Icon(image)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para>display system icons </para></entry><entry colsep="1" rowsep="1"><para>  See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnNavigation#">HelpOnNavigation</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;UserPreferences&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> display a user preferences dialog </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/UserPreferences#">UserPreferences</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;UserPreferences(createonly)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> display user creation dialog </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;BR&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> insert a line break </para></entry><entry colsep="1" rowsep="1"><para> 1st line</para><para>2nd line </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;RandomQuote(pagename)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> Select a random quote from the given page, or from <code>FortuneCookies</code> if omitted </para></entry><entry colsep="1" rowsep="1"><para> <code>&lt;&lt;RandomQuote&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Include(HelloWorld[,&quot;heading&quot;[,level]])&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> include contents of another page </para></entry><entry colsep="1" rowsep="1"><para> for details see <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnMacros/Include#">/Include</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;FootNote(text)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> Add a footnote<footnote><para>the text cannot contain any wiki markup</para></footnote>, or explicitly display collected footnotes when no args are given </para></entry><entry colsep="1" rowsep="1"><para> See below for an example. </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;Date(timestamp)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> display a timestamp according to system settings </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;DateTime(timestamp)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> display a timestamp<footnote><para>&quot;timestamp&quot; can be empty (current time), a number of seconds since 1970 (unix timestamp), or a W3C time specification (&quot;2002-01-23T12:34:56&quot;). See RFC822, sect. 5. </para></footnote> according to user settings </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;GetText(text)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> loads I18N texts (mainly intended for use on Help pages) </para></entry><entry colsep="1" rowsep="1"><para> &quot;EditText&quot; is translated to &quot;EditText&quot; </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;GetText2(,message,argument1,argument2,...)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> loads I18N texts (mainly intended for use on Help pages or in generated output on wiki pages) and replaces <code>%s</code> in the message by the arguments. The first character of the argument is used as the separator (in this example: a comma). You can escape the separator by using a backslash. </para></entry><entry colsep="1" rowsep="1"><para> &quot;<code>&lt;&lt;GetText2(,[You may not read %s],FooBar)&gt;&gt;</code>&quot; yields &quot;[Potresti non aver letto FooBar]&quot; </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;TeudView&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> useful for intranet developer wikis, a means to view pydoc documentation, formatted via a XSLT stylesheet </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://twistedmatrix.com/wiki/python/TeudProject"/> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;MailTo(email)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> protect your email address from spam bots </para></entry><entry colsep="1" rowsep="1"><para> for details see <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnMacros/MailTo#">/MailTo</ulink> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;NewPage(PageTemplate,ButtonLabel,[ParentPage,@ME,@SELF] [,NameTemplate])&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> Allow the user to create (sub-) pages easily, using the page <code>PageTemplate</code>as the template for the new page and the string <code>NameTemplate</code> as a template for the name.<footnote><para>`NameTemplate` is formatted with `time.strftime()`, with the exception of `%s` which is replaced by the input into the edit box (which is only shown if necessary). If `NameTemplate` is not specified or empty, it defaults to `%s`.</para></footnote> <code>@ME</code> is used if you want the  page created below the users homepage. <code>@SELF</code> is used to create a subpage below the page where it is called from. </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;GetVal(NeatSnippets,regards)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> Retrieve dictionary entries from dict pages. </para></entry><entry colsep="1" rowsep="1"><para> If you have a page called <ulink url="http://www.nnx.me/HelpOnMacros/GermanDict#">GermanDict</ulink> which contains the entry <emphasis>Test</emphasis>, you should see the translation here:  </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_2" namest="col_0" rowsep="1"><para><code>&lt;&lt;MonthCalendar(,,12)&gt;&gt;</code> </para></entry></row><row rowsep="1"><entry colsep="1" rowsep="1"/><entry colsep="1" rowsep="1" valign="top"><para> Displays a Calendar and creates link for entries to each day on subpages </para></entry><entry colsep="1" rowsep="1"><para> See <ulink url="http://www.nnx.me/HelpOnMacros/HelpOnMacros/MonthCalendar#">/MonthCalendar</ulink> </para></entry></row></tbody></tgroup></informaltable><para><footnote><para>None</para></footnote> </para></section><section><title>Writing your own macro</title><para>Create a python file called <code>MacroName.py</code> located in your <code>data/plugin/macro</code> directory. Ensure it has a single method called <code>execute(macro, arguments)</code>, which is the entry-point. </para><itemizedlist><listitem><para><emphasis>macro</emphasis> is an instance of class Macro, and also evaluates to a string of the macroname. </para></listitem><listitem><para><emphasis>arguments</emphasis> is an arbitrary argument string you can pass in with parameters to your macro. </para></listitem></itemizedlist><para>All <code>Macro</code> instances have a <code>request</code> member through which you can access the form parameters and other information related to user interaction. </para><para><code>execute()</code> 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 <code>text/plain</code> are requested. </para><para>For example, your wiki page has the following line on it: </para><screen><![CDATA[<<MacroName(arg1,arg2,arg3)>>]]></screen><para>You could write a MacroName.py file like this: </para><programlisting format="linespecific" language="python" linenumbering="numbered" startinglinenumber="1"><methodname><![CDATA[Dependencies]]></methodname><![CDATA[ = []]]>
<token><![CDATA[def]]></token><![CDATA[ ]]><methodname><![CDATA[execute]]></methodname><![CDATA[(]]><methodname><![CDATA[macro]]></methodname><![CDATA[, ]]><methodname><![CDATA[args]]></methodname><![CDATA[):]]>
<![CDATA[    ]]><token><![CDATA[return]]></token><![CDATA[ ]]><methodname><![CDATA[macro]]></methodname><![CDATA[.]]><methodname><![CDATA[formatter]]></methodname><![CDATA[.]]><methodname><![CDATA[text]]></methodname><![CDATA[(]]><phrase><![CDATA["]]></phrase><phrase><![CDATA[I got these args from a macro ]]></phrase><phrase><![CDATA[%s]]></phrase><phrase><![CDATA[: ]]></phrase><phrase><![CDATA[%s]]></phrase><phrase><![CDATA["]]></phrase><![CDATA[ %]]>
<![CDATA[    (]]><token><![CDATA[str]]></token><![CDATA[(]]><methodname><![CDATA[macro]]></methodname><![CDATA[), ]]><methodname><![CDATA[args]]></methodname><![CDATA[))]]>
</programlisting><itemizedlist><listitem override="none"><para><inlinemediaobject><imageobject><imagedata depth="15" fileref="http://www.nnx.me//moin_static197/ninuxtheme02/img/alert.png" width="15"/></imageobject><textobject><phrase>/!\</phrase></textobject></inlinemediaobject> Add an entry into <code>Dependencies</code> if the output from your macro should not be cached. This is important if the macro output could change from one moment to another, for example if your macro searches in wiki pages which may be being edited by other users, or loads information from an external database whose contents may change. Currently the value of any entry does not matter and may be considered a short description for 'why results from this macro should not be cached', but please look at the entries used in other macros for values which may be suitable. </para></listitem></itemizedlist><para><footnote><para>None</para></footnote> </para></section></section></article>