{{{#!box important This page was a draft. See default [[wiki:/WikiMacros]] page now. }}} = Trac Macros = [[PageOutline]] [[TranslatedPages]] Trac macros are plugins to extend the Trac engine with custom 'functions' written in Python. A macro inserts dynamic HTML data in any context supporting WikiFormatting. Another kind of macros are WikiProcessors. They typically deal with alternate markup formats and representation of larger blocks of information (like source code highlighting). == Using Macros == Macro calls are enclosed in two ''square brackets''. Like Python functions, macros can also have arguments, a comma separated list within parentheses. === Getting Detailed Help === The list of available macros and the full help can be obtained using the !MacroList macro, as seen [#AvailableMacros below]. A brief list can be obtained via `[[MacroList(*)]]` or `[[?]]`. Detailed help on a specific macro can be obtained by passing it as an argument to !MacroList, e.g. `[[MacroList(MacroList)]]`, or, more conveniently, by appending a question mark (`?`) to the macro's name, like in `[[MacroList?]]`. === Example === A list of 3 most recently changed wiki pages starting with 'Trac': ||= Wiki Markup =||= Display =|| {{{#!td {{{ [[RecentChanges(Trac,3)]] }}} }}} {{{#!td style="padding-left: 2em;" [[RecentChanges(Trac,3)]] }}} |----------------------------------- {{{#!td {{{ [[RecentChanges?(Trac,3)]] }}} }}} {{{#!td style="padding-left: 2em;" [[RecentChanges?(Trac,3)]] }}} |----------------------------------- {{{#!td {{{ [[?]] }}} }}} {{{#!td style="padding-left: 2em" {{{#!html
[[Image]]
[[InterTrac]]
[[InterWiki]]
[[KnownMimeTypes]]