Changes between Version 1 and Version 2 of 0.12/WikiMacros
- Timestamp:
- Feb 2, 2010, 3:53:25 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
0.12/WikiMacros
v1 v2 8 8 9 9 == Using Macros == 10 10 11 Macro calls are enclosed in two ''square brackets''. Like Python functions, macros can also have arguments, a comma separated list within parentheses. 11 12 12 Trac macros can also be written as TracPlugins. This gives them some capabilities that macros do not have, such as being able to directly access the HTTP request. 13 === Getting Detailed Help === 14 The list of available macros and the full help can be obtained using the !MacroList macro, as seen [#AvailableMacros below]. 15 16 A brief list can be obtained via ![[MacroList(*)]] or ![[?]]. 17 18 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?]]. 19 20 13 21 14 22 === Example === … … 16 24 A list of 3 most recently changed wiki pages starting with 'Trac': 17 25 18 {{{ 19 [[RecentChanges(Trac,3)]] 26 ||= Wiki Markup =||= Display =|| 27 {{{#!td 28 {{{ 29 [[RecentChanges(Trac,3)]] 30 }}} 20 31 }}} 21 22 Display: 23 [[RecentChanges(Trac,3)]] 32 {{{#!td style="padding-left: 2em;" 33 [[RecentChanges(Trac,3)]] 34 }}} 35 |----------------------------------- 36 {{{#!td 37 {{{ 38 [[RecentChanges?(Trac,3)]] 39 }}} 40 }}} 41 {{{#!td style="padding-left: 2em;" 42 [[RecentChanges?(Trac,3)]] 43 }}} 44 |----------------------------------- 45 {{{#!td 46 {{{ 47 [[?]] 48 }}} 49 }}} 50 {{{#!td style="padding-left: 2em; font-size: 80%" 51 [[?]] 52 }}} 24 53 25 54 == Available Macros == … … 34 63 35 64 == Developing Custom Macros == 36 Macros, like Trac itself, are written in the [http://python.org/ Python programming language] .65 Macros, like Trac itself, are written in the [http://python.org/ Python programming language] and are developed as part of TracPlugins. 37 66 38 67 For more information about developing macros, see the [trac:TracDev development resources] on the main project site.