forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: Customising plugins (Re: svn commit: r412368 - /forrest/trunk/site-author/content/xdocs/pluginDocs/plugins_0_80/usingPlugins.xml)
Date Wed, 07 Jun 2006 15:42:15 GMT
Ross Gardler wrote:
> Johannes Schaefer wrote:
>> Ross Gardler wrote:


> Configurable behaviour
> ----------------------
> Make the behaviour configurable using
> WARNING: This new property definition method is not officially part of 
> Forrest, so use this technique at your own risk. However, it is used 
> within a number of plugins at allready and appears to be a far superior 
> configuration system than the current "official" method.
> allows you to expose configuration options for a 
> plugin in the forrest configuration files. Plugins can provide default 
> settings for each property, then projects, users or even site 
> customisations can be provided. It is used extensively in the Daisy plugin.
> It is largely undocumented at present, but there are plenty of notes in 
> the issue tracker [1]
> Resource Overriding
> -------------------
> If you simply want to replace a resource provided by the plugin, for 
> example, substitute your own images for those supplied by the plugin you 
>  should be able to use the locationmap.
> A correctly designed plugin will resolve all resources via the 
> locationmap. Furthermore it will conform to the naming convention 
> defined for locationmaps [2]
> A well documented plugin will clearly identify what resources it exposes 
> via its locationmap.
> Taking these two things into account we can replace any resource by 
> simply adding a match to our project locationamp for the relevant item. 
> For example, if a pluiging provides a set of button images that are 
> exposed in the locationmap as "" we can add a 
> match like this:
> <match src="fooPlugin.button.**">
>   <location src="{project.home}/xdocs/images/buttons/{1}"/>
> </match>

It's also worth noting that if you add a <select> tag around the 
<location> tag then processing will fall back to the standard plugin 
provided resources if no suitable project resource is provided.


> [1]
> [2]

View raw message