UserPreferences

HelpOnMacros


  1. Macros
    1. Search macros
    2. Navigation
    3. System information
    4. Others
  2. Example Display

1. Macros

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.

1.1. Search macros

Macro Description Example
[[TitleSearch]] search the page titles See the FindPage
[[FullSearch]] search the page contents See the FindPage
[[FullSearch()]] search for the current title in all pages (like clicking on the page title) See the CategoryCategory page
[[FullSearch('text')]] search for "text" in all pages Search for FullSearch:
  1. AiutoSuMacro . . . . 6 matches
  2. HelpOnMacros . . . . 6 matches
  3. HilfeZuMakros . . . . 6 matches
  4. HjälpMedMakron . . . . 6 matches
  5. brogame-py-03 . . . . 4 matches
  6. wow+gold-mssm . . . . 4 matches
  7. wow+gold-py-31 . . . . 4 matches
  8. AideActions . . . . 3 matches
  9. AiutoSuAzioni . . . . 3 matches
  10. HelpOnActions . . . . 3 matches
  11. HilfeZuAktionen . . . . 3 matches
  12. HjälpMedÅtgärder . . . . 3 matches
  13. CategoryCategory . . . . 1 match
  14. CercaPagina . . . . 1 match
  15. FindPage . . . . 1 match
  16. FindSide . . . . 1 match
  17. KategoriKategori . . . . 1 match
  18. KategorieHomepage . . . . 1 match
  19. KategorieKategorie . . . . 1 match
  20. NavigaIlSito . . . . 1 match
  21. PlatsNavigering . . . . 1 match
  22. SeiteFinden . . . . 1 match
  23. SiteNavigering . . . . 1 match
  24. SökSida . . . . 1 match
  25. TrouvePage . . . . 1 match
  26. WegWeiser . . . . 1 match
[[GoTo]] directly go to the page you enter See the FindPage
[[PageList(regex)]] list of pages whose title matches the regex See the HelpIndex

1.2. Navigation

Macro Description Example
[[RecentChanges]] a list of recently edited pages See RecentChanges
[[TitleIndex]] an index of all page titles See TitleIndex
[[WordIndex]] an index of all words in page titles See WordIndex
[[WantedPages]] list links to non-existent pages See WantedPages
[[OrphanedPages]] list pages no other page links to See OrphanedPages
[[AbandonedPages]] list pages that were not edited for the longest time See AbandonedPages
[[RandomPage]] a link to a random page --> -->
 
 
Cannot load macro RandomPage
Please include this information in your bug reports!:
Python Python 2.5.2: /usr/bin/python
Linux piece 2.6.24-16-server #1 SMP Thu Apr 10 13:15:38 UTC 2008 x86_64
MoinMoin Release 1.2.4 [Revision 1.187]
Wed May 23 04:43:19 2012

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /var/moin/DemeWiki/MoinMoin/request.py in run(self=<MoinMoin.request.RequestCGI instance at 0x7fbe30428cf8>)
  403 
  404                 if config.allow_extended_names:
  405                     Page(query).send_page(self, count_hit=1)
  406                 else:
  407                     from MoinMoin.parser.wiki import Parser
Page = <class MoinMoin.Page.Page at 0x9825f0>, query = 'HelpOnMacros', ).send_page undefined, self = <MoinMoin.request.RequestCGI instance at 0x7fbe30428cf8>, count_hit undefined

 /var/moin/DemeWiki/MoinMoin/Page.py in send_page(self=<MoinMoin.Page.Page instance at 0x9f0ea8>, request=<MoinMoin.request.RequestCGI instance at 0x7fbe30428cf8>, msg='', **keywords={'count_hit': 1})
  622         else:
  623             # parse the text and send the page content
  624             self.send_page_content(request, Parser, body)
  625 
  626             # check for pending footnotes
self = <MoinMoin.Page.Page instance at 0x9f0ea8>, self.send_page_content = <bound method Page.send_page_content of <MoinMoin.Page.Page instance at 0x9f0ea8>>, request = <MoinMoin.request.RequestCGI instance at 0x7fbe30428cf8>, Parser = <class MoinMoin.parser.wiki.Parser at 0xa5a410>, body = '[[Navigation(children)]]\n[[TableOfContents]]\n\n==... the {{{[[SystemInfo]]}}} macro:\n [[SystemInfo]]\n'

 /var/moin/DemeWiki/MoinMoin/Page.py in send_page_content(self=<MoinMoin.Page.Page instance at 0x9f0ea8>, request=<MoinMoin.request.RequestCGI instance at 0x7fbe30428cf8>, Parser=<class MoinMoin.parser.wiki.Parser at 0xa5a410>, body='[[Navigation(children)]]\n[[TableOfContents]]\n\n==... the {{{[[SystemInfo]]}}} macro:\n [[SystemInfo]]\n', needsupdate=0)
  721 
  722         try:
  723             exec code
  724         except 'CacheNeedsUpdate': # if something goes wrong, try without caching
  725            self.send_page_content(request, Parser, body, needsupdate=1)
code = <code object <module> at 0xa56af8, file "HelpOnMacros", line 2>

 /var/moin/DemeWiki/HelpOnMacros in ()

 /var/moin/DemeWiki/MoinMoin/formatter/base.py in macro(self=<MoinMoin.formatter.text_html.Formatter instance at 0xa3a200>, macro_obj=<MoinMoin.wikimacro.Macro instance at 0xaa2cb0>, name='RandomPage', args=None)
  160     def macro(self, macro_obj, name, args):
  161         # call the macro
  162         return macro_obj.execute(name, args)    
  163 
  164     def processor(self, processor_name, lines):
macro_obj = <MoinMoin.wikimacro.Macro instance at 0xaa2cb0>, macro_obj.execute = <bound method Macro.execute of <MoinMoin.wikimacro.Macro instance at 0xaa2cb0>>, name = 'RandomPage', args = None

 /var/moin/DemeWiki/MoinMoin/wikimacro.py in execute(self=<MoinMoin.wikimacro.Macro instance at 0xaa2cb0>, macro_name='RandomPage', args=None)
  110             return self._m_lang(macro_name, args)
  111 
  112         raise ImportError("Cannot load macro %s" % macro_name)
  113 
  114     def _m_lang(self, lang_name, text):
ImportError undefined, macro_name = 'RandomPage'

: Cannot load macro RandomPage