| 1 | = Configuration (trac.ini) API = |
| 2 | Most of Trac's configuration is stored in the [TracIni trac.ini] file. Trac provides an API to retrieve and set the settings in this configuration file. |
| 3 | |
| 4 | For the sake of this article, here's a quick reminder of the structure of `trac.ini`: |
| 5 | |
| 6 | {{{ |
| 7 | [wiki] ; <= section |
| 8 | ignore_missing_pages = false ; <= option with option value |
| 9 | max_size = 262144 |
| 10 | render_unsafe_content = false |
| 11 | }}} |
| 12 | |
| 13 | The file consists of multiple ''sections'' (written as `[sectionname]`). Each section consists of multiple ''options'' with their ''option values'' (like `ignore_missing_pages = false` in the example above). All options that come after the beginning of a section belong to this section - until a new section begins. |
| 14 | |
| 15 | == Retrieving arbitrary option values == |
| 16 | |
| 17 | == Setting arbitrary option values == |
| 18 | |
| 19 | == Defining new options == |
| 20 | |
| 21 | == Retrieving the value of previously defined options == |