forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scher...@wyona.com>
Subject Re: Plugin Specific Stylsheets
Date Mon, 16 Oct 2006 11:26:10 GMT
On Mon, 2006-10-16 at 12:09 +0100, Ross Gardler wrote:
> Cyriaque Dupoirieux wrote:
> > le 16/10/2006 11:03 Gav.... a écrit :
> >> I think we touched on this before, at least I remember lots of
> >> Questions on how can it be done.
> >>
> >> As an example FOR-412 has a stylesheet in Jira ready to be applied
> >> But we don't know where to apply it (at least I don't).
> >>
> >> We don't want plugin specific stylesheets to be mixed up with
> >> Skin or theme stylesheets because they will be redundant to
> >> Those that don't use the plugin. Also things like images that
> >> Are for the projectinfo plugin reside in core when they should Also be 
> >> in the plugin as they are plugin specific.
> >>
> >> So I had a thought. I wonder if we can create a /resources/css
> >> In the plugin, put any stylesheets in there,
> > I am a fervent supporter of this behaviour.
> > I think that plugin should be able to come with specific resources (css 
> > files, xsl style sheets, images...) and these resources should not be 
> > part of the core.
> 
> You already can, see [1] for an example of stylesheets being provided. 
> Using the locationmap it's an easy case to provide other resources too.

The link you provide her shows xsl. Like I understood Gavinthe question
is whether we should allow css/.

Now Ross and Cyriaque already pointed out the right solution.


> 
> >>  enable it with
> >> A 'plugin.stylesheet="yes"' in the plugins forrest.properties.xml
> >> And then get forrest to check for this when the 'forrest' gets built
> >> And adds it to the projects /resources/css and adds it to the rendered
> >> Output.
> >>   
> > In my first thought, there was no need of such a property.
> > The plugin comes with its resources which can be overriden by projects 
> > with location map fallback mecanism...
> 
> Yes, see above.
> 

To explain  it a wee bit more. You need to add a 
default.plugin.properties.xml to the plugin. Here (and in the plugin
locationmap) you define the fallback properties (image names,..)/
locations for the resources. 

Then you request in the plugin all resource via the properties/lm API.
This way the user can override this resources by providing her own
implementation (defining in forrest.properties.xml and project
locationmap.xml the new values).

salu2

> Ross
> 
> [1] 
> http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/

-- 
Thorsten Scherler
COO Spain
Wyona Inc.  -  Open Source Content Management  -  Apache Lenya
http://www.wyona.com                   http://lenya.apache.org
thorsten.scherler@wyona.com                thorsten@apache.org


Mime
View raw message