You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ross Gardler <rg...@apache.org> on 2007/04/18 14:39:51 UTC

Where to put my own (reusabel) theme

I have a Forrest based sub project, this project provides its own theme. 
I want to be able to reuse this theme across multiple sites generated by 
my sub-project.

It is not an option to contribute this theme to Forrest (although it 
will be available under the Apache License). Therefore, the ideal 
solution would be to provide a theme plugin, say

ac.uk.osswatch.forrest.themes

However, looking at the sitemaps in the current dispatcher I'm not clear 
on how this can be achieved.

Any pointers?

Ross

Re: Where to put my own (reusabel) theme

Posted by Ross Gardler <rg...@apache.org>.
On 07/05/07, Thorsten Scherler
<th...@juntadeandalucia.es> wrote:
> On Thu, 2007-04-19 at 13:32 +0200, Thorsten Scherler wrote:
> > On Wed, 2007-04-18 at 13:39 +0100, Ross Gardler wrote:
> > > I have a Forrest based sub project, this project provides its own theme.
> > > I want to be able to reuse this theme across multiple sites generated by
> > > my sub-project.
> > >
> > > It is not an option to contribute this theme to Forrest (although it
> > > will be available under the Apache License). Therefore, the ideal
> > > solution would be to provide a theme plugin, say
> > >
> > > ac.uk.osswatch.forrest.themes
> > >
> > > However, looking at the sitemaps in the current dispatcher I'm not clear
> > > on how this can be achieved.
> > >
> > > Any pointers?
> >
> > You can override the core themes by setting either
> > properties:dispatcher.themer in f.p.x or lm:dispatcher.themer in your
> > project lm.
> >
> > This first would loose the core themes, since everything will be
> > searched in your custom theme package then.
> >
> > Adding it to the project lm like will overcome this downside:
> >
> > <!-- Base location of the builded themer plugin-->
> >     <match pattern="dispatcher.themer">
> >       <location src="{properties:forrest.plugins}/ac.uk.osswatch.forrest.themes" />
> >       <location src="{properties:forrest.plugins}/{properties:dispatcher.themer}" />
> >     </match>

That did not work if you want to use any contracts that are provided
by the common themes. Since we are only looking in the custom themer
for contracts.

I've patched dispatcher so that it does work though, you just need to add:

<match pattern="dispatcher.themer">
  <location src="{properties:forrest.plugins}/ac.uk.osswatch.forrest.themes" />
</match>

To your locationmap.

Ross

Re: Where to put my own (reusabel) theme

Posted by Thorsten Scherler <th...@apache.org>.
On Tue, 2007-05-08 at 14:01 +0100, Ross Gardler wrote:
> I've not had a chance to try it out I'm afraid. I've been moving house
> (yes again), I'm hoping to get back to this within the week and will
> let you know how I get on.

Cheers and all the best for moving. Has to be double stressing with
kids.

I just have been curious, thanks to let us know.

salu2

> 
> Ross
> 
> On 07/05/07, Thorsten Scherler
> <th...@juntadeandalucia.es> wrote:
> > On Thu, 2007-04-19 at 13:32 +0200, Thorsten Scherler wrote:
> > > On Wed, 2007-04-18 at 13:39 +0100, Ross Gardler wrote:
> > > > I have a Forrest based sub project, this project provides its own theme.
> > > > I want to be able to reuse this theme across multiple sites generated by
> > > > my sub-project.
> > > >
> > > > It is not an option to contribute this theme to Forrest (although it
> > > > will be available under the Apache License). Therefore, the ideal
> > > > solution would be to provide a theme plugin, say
> > > >
> > > > ac.uk.osswatch.forrest.themes
> > > >
> > > > However, looking at the sitemaps in the current dispatcher I'm not clear
> > > > on how this can be achieved.
> > > >
> > > > Any pointers?
> > >
> > > You can override the core themes by setting either
> > > properties:dispatcher.themer in f.p.x or lm:dispatcher.themer in your
> > > project lm.
> > >
> > > This first would loose the core themes, since everything will be
> > > searched in your custom theme package then.
> > >
> > > Adding it to the project lm like will overcome this downside:
> > >
> > > <!-- Base location of the builded themer plugin-->
> > >     <match pattern="dispatcher.themer">
> > >       <location src="{properties:forrest.plugins}/ac.uk.osswatch.forrest.themes" />
> > >       <location src="{properties:forrest.plugins}/{properties:dispatcher.themer}" />
> > >     </match>
> > >
> > > The more user friendly way would be to create a themes build dir aka
> > > plugin build dir that would be populated with all different theme
> > > plugins you define in your properties.
> > >
> > > One way to implement this is to create a new property like
> > > dispatcher.theme.plugins=org.apache.forrest.themes.core,ac.uk.osswatch.forrest.themes
> > > and merge all plugins to one theme repository.
> > >
> > > Anyway the lm way should work just fine.
> > >
> > > HTH
> >
> > Did that work for you?
> >
> > salu2
> > --
> > Thorsten Scherler                                 thorsten.at.apache.org
> > Open Source Java                      consulting, training and solutions
> >
> >
> >
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: Where to put my own (reusabel) theme

Posted by Ross Gardler <rg...@apache.org>.
I've not had a chance to try it out I'm afraid. I've been moving house
(yes again), I'm hoping to get back to this within the week and will
let you know how I get on.

Ross

On 07/05/07, Thorsten Scherler
<th...@juntadeandalucia.es> wrote:
> On Thu, 2007-04-19 at 13:32 +0200, Thorsten Scherler wrote:
> > On Wed, 2007-04-18 at 13:39 +0100, Ross Gardler wrote:
> > > I have a Forrest based sub project, this project provides its own theme.
> > > I want to be able to reuse this theme across multiple sites generated by
> > > my sub-project.
> > >
> > > It is not an option to contribute this theme to Forrest (although it
> > > will be available under the Apache License). Therefore, the ideal
> > > solution would be to provide a theme plugin, say
> > >
> > > ac.uk.osswatch.forrest.themes
> > >
> > > However, looking at the sitemaps in the current dispatcher I'm not clear
> > > on how this can be achieved.
> > >
> > > Any pointers?
> >
> > You can override the core themes by setting either
> > properties:dispatcher.themer in f.p.x or lm:dispatcher.themer in your
> > project lm.
> >
> > This first would loose the core themes, since everything will be
> > searched in your custom theme package then.
> >
> > Adding it to the project lm like will overcome this downside:
> >
> > <!-- Base location of the builded themer plugin-->
> >     <match pattern="dispatcher.themer">
> >       <location src="{properties:forrest.plugins}/ac.uk.osswatch.forrest.themes" />
> >       <location src="{properties:forrest.plugins}/{properties:dispatcher.themer}" />
> >     </match>
> >
> > The more user friendly way would be to create a themes build dir aka
> > plugin build dir that would be populated with all different theme
> > plugins you define in your properties.
> >
> > One way to implement this is to create a new property like
> > dispatcher.theme.plugins=org.apache.forrest.themes.core,ac.uk.osswatch.forrest.themes
> > and merge all plugins to one theme repository.
> >
> > Anyway the lm way should work just fine.
> >
> > HTH
>
> Did that work for you?
>
> salu2
> --
> Thorsten Scherler                                 thorsten.at.apache.org
> Open Source Java                      consulting, training and solutions
>
>
>

Re: Where to put my own (reusabel) theme

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Thu, 2007-04-19 at 13:32 +0200, Thorsten Scherler wrote:
> On Wed, 2007-04-18 at 13:39 +0100, Ross Gardler wrote:
> > I have a Forrest based sub project, this project provides its own theme. 
> > I want to be able to reuse this theme across multiple sites generated by 
> > my sub-project.
> > 
> > It is not an option to contribute this theme to Forrest (although it 
> > will be available under the Apache License). Therefore, the ideal 
> > solution would be to provide a theme plugin, say
> > 
> > ac.uk.osswatch.forrest.themes
> > 
> > However, looking at the sitemaps in the current dispatcher I'm not clear 
> > on how this can be achieved.
> > 
> > Any pointers?
> 
> You can override the core themes by setting either
> properties:dispatcher.themer in f.p.x or lm:dispatcher.themer in your
> project lm.
> 
> This first would loose the core themes, since everything will be
> searched in your custom theme package then.
> 
> Adding it to the project lm like will overcome this downside:
> 
> <!-- Base location of the builded themer plugin-->
>     <match pattern="dispatcher.themer">
>       <location src="{properties:forrest.plugins}/ac.uk.osswatch.forrest.themes" />
>       <location src="{properties:forrest.plugins}/{properties:dispatcher.themer}" />
>     </match>
> 
> The more user friendly way would be to create a themes build dir aka
> plugin build dir that would be populated with all different theme
> plugins you define in your properties.
> 
> One way to implement this is to create a new property like
> dispatcher.theme.plugins=org.apache.forrest.themes.core,ac.uk.osswatch.forrest.themes
> and merge all plugins to one theme repository.
> 
> Anyway the lm way should work just fine.
> 
> HTH

Did that work for you?

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: Where to put my own (reusabel) theme

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Wed, 2007-04-18 at 13:39 +0100, Ross Gardler wrote:
> I have a Forrest based sub project, this project provides its own theme. 
> I want to be able to reuse this theme across multiple sites generated by 
> my sub-project.
> 
> It is not an option to contribute this theme to Forrest (although it 
> will be available under the Apache License). Therefore, the ideal 
> solution would be to provide a theme plugin, say
> 
> ac.uk.osswatch.forrest.themes
> 
> However, looking at the sitemaps in the current dispatcher I'm not clear 
> on how this can be achieved.
> 
> Any pointers?

You can override the core themes by setting either
properties:dispatcher.themer in f.p.x or lm:dispatcher.themer in your
project lm.

This first would loose the core themes, since everything will be
searched in your custom theme package then.

Adding it to the project lm like will overcome this downside:

<!-- Base location of the builded themer plugin-->
    <match pattern="dispatcher.themer">
      <location src="{properties:forrest.plugins}/ac.uk.osswatch.forrest.themes" />
      <location src="{properties:forrest.plugins}/{properties:dispatcher.themer}" />
    </match>

The more user friendly way would be to create a themes build dir aka
plugin build dir that would be populated with all different theme
plugins you define in your properties.

One way to implement this is to create a new property like
dispatcher.theme.plugins=org.apache.forrest.themes.core,ac.uk.osswatch.forrest.themes
and merge all plugins to one theme repository.

Anyway the lm way should work just fine.

HTH

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java & XML                consulting, training and solutions