You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Gav...." <br...@brightontown.com.au> on 2006/10/16 11:03:31 UTC

Plugin Specific Stylsheets

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, 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.

Does that make sense. If so or not any ideas on how to get started?

Once this plugin stylesheet problem is sorted then a few issues I think
Can be closed, including FOR-412 to start with to test if the solution
Works.

Gav...



Re: Plugin Specific Stylsheets

Posted by David Crossley <cr...@apache.org>.
Gav.... wrote:
> I think we touched on this before, at least I remember lots of
> Questions on how can it be done.

IIRC there were also some suggestions.

> 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, enable it with
> A 'plugin.stylesheet="yes"' in the plugins forrest.properties.xml

I don't understand why any such property is needed.

> 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.
> 
> Does that make sense. If so or not any ideas on how to get started?
> 
> Once this plugin stylesheet problem is sorted then a few issues I think
> Can be closed, including FOR-412 to start with to test if the solution
> Works.

The other part is how to include the
<head><link href="foo/bar.css" ...
in the html output. That is easy with Dispatcher as there
is a contract for it. Not sure how with Skins.

-David

RE: Plugin Specific Stylsheets

Posted by "Gav...." <br...@brightontown.com.au>.
Thanks Everyone, I'll take a look and see what happens. ;)

Gav...

> -----Original Message-----
> From: Thorsten Scherler [mailto:thorsten.scherler@wyona.com]
> Sent: Monday, 16 October 2006 7:26 PM
> To: dev@forrest.apache.org
> Subject: Re: Plugin Specific Stylsheets
> 
> 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.f
> orrest.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




Re: Plugin Specific Stylsheets

Posted by Thorsten Scherler <th...@wyona.com>.
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


Re: Plugin Specific Stylsheets

Posted by Ross Gardler <rg...@apache.org>.
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.

>>  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.

Ross

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


Re: Plugin Specific Stylsheets

Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
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.


>  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...

> Does that make sense. If so or not any ideas on how to get started?
>   
I have not think about it yet,
I will come back latter..

Salutations,
Cyriaque,

> Once this plugin stylesheet problem is sorted then a few issues I think
> Can be closed, including FOR-412 to start with to test if the solution
> Works.
>
> Gav...
>
>
>
>