[[PageOutline(2-5,Contents,pullout)]] = Pass configuration options to Trac templates == Description This plugin allows you to pass arbitrary options from conf.ini's to templates in Trac. You put whatever options you'd like in a [project_info] stanza inside your Trac's .ini file. These are passed to the template as key-value pairs inside the dictionary 'project_info'. You can also access data for other projects in your trac env under the list 'projects'. That list will have a dictionary with keys 'name', 'description', 'href', and 'info', where the first three are the same as in a project list, and the 'info' is the dictionary of arbitrary options you've passed for that project. You can do this for your project listing page too, using the ArbitraryProjectPropertiesPatch. For example, if your `trac.ini` file had this: {{{#!ini [project_info] short_name = my_project status = active order = 3 }}} You could access it in your Trac's Genshi templates like this: {{{ Short name is ${project_info.get('short_name')}. Status is ${project_info.get('status')}. Order is ${project_info.get('order')}. }}} You could iterate over your whole projects list like this: {{{
  • ${proj.name};
  • }}} Note that this is only implemented for the Genshi templating engine at present. == Bugs/Feature Requests Existing bugs and feature requests for ArbitraryOptionsPlugin are [report:9?COMPONENT=ArbitraryOptionsPlugin here]. If you have any issues, create a [/newticket?component=ArbitraryOptionsPlugin new ticket]. [[TicketQuery(component=ArbitraryOptionsPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:arbitraryoptionsplugin here]. == Source You can check out ArbitraryOptionsPlugin from [/svn/arbitraryoptionsplugin here] using Subversion, or [source:arbitraryoptionsplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. You can also just run: {{{#!sh $ easy_install TracArbitraryOptionsPlugin }}} == Recent Changes [[ChangeLog(arbitraryoptionsplugin, 3)]] == Author/Contributors '''Author:''' [wiki:david] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''