[[PageOutline(2-5,Contents,pullout)]] = Help Macros and Plugins with trac.ini lookup and defaulting = == Description == ''By itself, this modules does not provide any functionality.''' This module provides a helper class which can be used by other plugins, especially macros, in retrieving optional arguments from trac.ini. A macro using this module, can be called with a '''config=xxx''' option, to retrieve a set of options which in trac.ini all start with prefix '''xxx.''' Inheritance is supported, by writing an option '''xxx.inherit = yyy''' in trac.ini - all macro options not yet determined, are then searched with the other prefix, '''yyy.''' Multiple inheritance is supported, by writing '''config=prefixA|prefixB''' in the macro invocation, or writing an '''xxx.inherit = prefixC|prefixD''' option in trac.ini The macro module which uses this functionality, specifies a list of expected options, as well as their defaults. These defaults will then be used when the respective option is specified nowhere. == Example == Right now, as this is brand new, no plugin / macro uses the functionality. There is an '''examlemacro.py''' file included in the distribution, which when enabled through the admin plugings interface, provides a macro named '''!TracMacroConfigExample''', which displays a table detailling various interesting things about concrete option lookups. This allows you to play with macro arguments and in a corresponding '''[macroconfig-example]''' section in trac.ini, to play with inheritance setups. This is how exemplary calls to that macro would be written in a wiki page: {{{ [[TracMacroConfigExample(config=class-c, extra=more stuff)]] }}} Use this together with a trac.ini section like this: {{{ #!ini [macroconfig-example] class-a.bool = True class-a.text = A Text class-b.bool = False class-b.int = 73 class-c.config = class-a|class-b class-c.list = knees|toes }}} == Bugs/Feature Requests == Existing bugs and feature requests for TracMacroConfigPlugin are [report:9?COMPONENT=TracMacroConfigPlugin here]. If you have any issues, create a [http://trac-hacks.org/newticket?component=TracMacroConfigPlugin&owner=bof new ticket]. == Download == Download the zipped source from [download:tracmacroconfigplugin here]. == Source == You can check out TracMacroConfigPlugin from [http://trac-hacks.org/svn/tracmacroconfigplugin here] using Subversion, or [source:tracmacroconfigplugin browse the source] with Trac. == Recent Changes == [[ChangeLog(tracmacroconfigplugin, 3)]] == Author/Contributors == '''Author:''' [wiki:bof] [[BR]] '''Maintainer:''' [wiki:bof] [[BR]] '''Sponsor:''' [http://www.yalwa.de/ Yalwa Branchenbuch] [[BR]] '''Contributors:'''