Changes between Initial Version and Version 1 of ArbitraryProjectPropertiesPatch


Ignore:
Timestamp:
Feb 3, 2010, 7:16:24 PM (14 years ago)
Author:
David
Comment:

New hack ArbitraryProjectPropertiesPatch, created by david

Legend:

Unmodified
Added
Removed
Modified
  • ArbitraryProjectPropertiesPatch

    v1 v1  
     1= Patch Trac to allow Arbitrary Project Properties =
     2
     3== Description ==
     4
     5Using this patch you can specify a [project_info] stanza in your trac.ini file, and everything in that stanza will be passed to your project listing template as key-value pairs under the dictionary ``project.info``.
     6
     7You can do this inside your project listings too, with the ArbitraryOptionsPlugin.
     8
     9== Bugs/Feature Requests ==
     10
     11Existing bugs and feature requests for ArbitraryProjectPropertiesPatch are
     12[report:9?COMPONENT=ArbitraryProjectPropertiesPatch here].
     13
     14If you have any issues, create a
     15[http://trac-hacks.org/newticket?component=ArbitraryProjectPropertiesPatch&owner=david new ticket].
     16
     17== Download ==
     18
     19Download the zipped source from [download:arbitraryprojectpropertiespatch here].
     20
     21== Source ==
     22
     23You can check out ArbitraryProjectPropertiesPatch from [http://trac-hacks.org/svn/arbitraryprojectpropertiespatch here] using Subversion, or [source:arbitraryprojectpropertiespatch browse the source] with Trac.
     24
     25== Example ==
     26
     27Imagine you have trac.ini's for each project with data like:
     28{{{
     29[project_info]
     30short_name = my_project
     31status = active
     32order = 3
     33}}}
     34
     35
     36You can then iterate over them in your project listing template like:
     37{{{
     38<div class='incubator'>
     39    <h3>Incubator</h3>
     40    <div py:for='project in projects' py:if='project.info.get("status") == "incubator"' class='project'>
     41        <a class='name' href='${project.href}'>${project.name}</a> -
     42        <span class='description'>${project.description}</span>
     43    </div>
     44</div>
     45}}}
     46
     47== Recent Changes ==
     48
     49[[ChangeLog(arbitraryprojectpropertiespatch, 3)]]
     50
     51== Author/Contributors ==
     52
     53'''Author:''' [wiki:david] [[BR]]
     54'''Maintainer:''' [wiki:david] [[BR]]
     55'''Contributors:'''