20 | | Macro calls are enclosed in double-square brackets `[[..]]`. Like Python functions macros can have arguments, which take the form of a comma separated list within parentheses `[[..(,)]]`. |
21 | | |
22 | | === Getting Detailed Help |
23 | | |
24 | | The list of available macros and the full help can be obtained using the !MacroList macro, see [#AvailableMacros below]. |
25 | | |
26 | | A brief list can be obtained via `[[MacroList(*)]]` or `[[?]]`. |
27 | | |
28 | | 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?]]`. |
29 | | |
30 | | === Example |
31 | | |
32 | | A list of the 3 most recently changed wiki pages starting with 'Trac': |
| 20 | Macro calls are enclosed in double-square brackets `[[..]]`. Like Python functions macros can have arguments, which take the form of a comma separated list within parentheses `[[..(,)]]`. A common macro used is a list of the 3 most recent changes to a wiki page, or here, for example, all wiki pages starting with 'Trac': |
43 | | |----------------------------------- |
44 | | {{{#!td |
45 | | {{{ |
46 | | [[RecentChanges?(Trac,3)]] |
47 | | }}} |
48 | | }}} |
49 | | {{{#!td style="padding-left: 2em;" |
50 | | [[RecentChanges?(Trac,3)]] |
51 | | }}} |
52 | | |----------------------------------- |
53 | | {{{#!td |
54 | | {{{ |
55 | | [[?]] |
56 | | }}} |
57 | | }}} |
58 | | {{{#!td style="padding-left: 2em" |
59 | | {{{#!html |
60 | | <div class="trac-macrolist"> |
61 | | <h3><code>[[Image]]</code></h3>Embed an image in wiki-formatted text. |
63 | | The first argument is the file, as in <code>[[Image(filename.png)]]</code> |
64 | | <h3><code>[[InterTrac]]</code></h3>Provide a list of known <a class="wiki" href="/wiki/InterTrac">InterTrac</a> prefixes. |
65 | | <h3><code>[[InterWiki]]</code></h3>Provide a description list for the known <a class="wiki" href="/wiki/InterWiki">InterWiki</a> prefixes. |
66 | | <h3><code>[[KnownMimeTypes]]</code></h3>List all known mime-types which can be used as <a class="wiki" href="/wiki/WikiProcessors">WikiProcessors</a>. |
67 | | </div> |
68 | | }}} |
69 | | etc. |
70 | | }}} |
| 32 | === Getting Detailed Help |
| 33 | |
| 34 | The list of available macros and the full help can be obtained using the !MacroList macro, see [#AvailableMacros below]. |
| 35 | |
| 36 | A brief list can be obtained via `[[MacroList(*)]]` or `[[?]]`. |
| 37 | |
| 38 | 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?]]`. |