| 1 | = Trac.ini [section].option Macro = |
| 2 | |
| 3 | == Description == |
| 4 | |
| 5 | The IniGetMacro package consists of two macros. The first, !IniGet, returns as plain text the value of a [http://trac-hacks.org/wiki/TracIni trac.ini] configuration option. The '''`trac.ini`''' file is a simple database of sections and option/value pairs: |
| 6 | |
| 7 | {{{ |
| 8 | [section] |
| 9 | name = value |
| 10 | }}} |
| 11 | |
| 12 | By calling the macro like so: `[[IniGet(section.name)]]`, it returns the value. |
| 13 | If no option matches, it returns an error message. Some option names themselves |
| 14 | contain periods, this is supported. |
| 15 | |
| 16 | The second macro in the package is Welcome, and it returns a level 1 heading |
| 17 | element in the following format: |
| 18 | |
| 19 | {{{ |
| 20 | <h1 id="welcome">Welcome to the project.name Project</h1> |
| 21 | }}} |
| 22 | |
| 23 | Where project.name is dynamically inserted in the same manner as !IniGet. |
| 24 | |
| 25 | These macros are useful for WikiStart project templates. |
| 26 | |
| 27 | == Bugs/Feature Requests == |
| 28 | |
| 29 | Existing bugs and feature requests for IniGetMacro are |
| 30 | [report:9?COMPONENT=IniGetMacro here]. |
| 31 | |
| 32 | If you have any issues, create a |
| 33 | [http://trac-hacks.org/newticket?component=IniGetMacro&owner=dwclifton new ticket]. |
| 34 | |
| 35 | == Download == |
| 36 | |
| 37 | Download the zipped source from [download:inigetmacro here]. |
| 38 | |
| 39 | == Source == |
| 40 | |
| 41 | You can check out IniGetMacro from [http://trac-hacks.org/svn/inigetmacro here] using Subversion, or [source:inigetmacro browse the source] with Trac. |
| 42 | |
| 43 | == Example == |
| 44 | |
| 45 | {{{ |
| 46 | [[Welcome]] |
| 47 | |
| 48 | The [[IniGet(project.name)]] project consists of a... |
| 49 | }}} |
| 50 | |
| 51 | == Recent Changes == |
| 52 | |
| 53 | [[ChangeLog(inigetmacro, 3)]] |
| 54 | |
| 55 | == Author/Contributors == |
| 56 | |
| 57 | '''Author:''' [wiki:dwclifton] [[BR]] |
| 58 | '''Contributors:''' |