El vie, 13-01-2006 a las 12:06 +1300, Paul Bolger escribió:
> > > <forrest:css url="styles.css" media="screen" theme="pult"/>
> >
> > Actually that is only interesting for the theme switcher and optional.
>
> The dispatcher docs (howto-structurer-dsl) says
>
> (attribute:theme) 3. the theme, "pelt" is the default theme (another
> is the "common" theme). Change this if you are using your own theme.
>
> Which to me means 'if you want to use css from a theme other than the
> default set that here'.
¿? Css actually is just a special contract format. Like always for
common you can reuse the css contract not only in common but as well in
a custom theme.
The only difference is that you are linking to more/other css files in
the {customTheme}.fv. ...and like always in the dispatcher we have
fallbacks implemented.
forrest-trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer
$ cat locationmap.xml
...
<!-- generic match for theme ressources like css and js. -->
<!--
{1} name
{2} extension (note we assume e.g. PATH/css/{1}.css)
-->
<match pattern="themes/**.*">
<select type="exists">
<location
src="{lm:themer.project.dir}/{project:theme}/{2}/{1}.{2}" />
<location
src="{lm:themer.project.dir}/{defaults:theme}/{2}/{1}.{2}" />
<location
src="{project:themer}/resources/themes/{project:theme}/{2}/{1}.{2}" />
<location
src="{project:themer}/resources/themes/{defaults:theme}/{2}/{1}.{2}" />
<location
src="{defaults:themer}/resources/themes/{project:theme}/{2}/{1}.{2}" />
<location
src="{defaults:themer}/resources/themes/{defaults:theme}/{2}/{1}.{2}" />
</select>
</match>
...
> In a recent post you wrote about using multiple themes. I didn't
> really understand how this could be done. Could you clarify please.
>
¿? Multiple views can you post what I wrote. You can use one theme at a
time. You can switch themes with the branding-theme-switcher.ft on the
fly, but you cannot use multiple views otherwise.
> > > but Forrest ignoring them and just looking in the common/css directory.
> >
> > hmm, have you modified your locationmap?
>
> No I haven't. Wouldn't redirecting using locationmap be a sort of
> 'bulldozer' solution?
No, with the locationmap you can override everything what I wrote above
and in the other mail about fallbacks in the dispatcher. That means if
you use your custom locationmap you override the core.
> Right at the moment I'm finding the whole theme setting/defining
> procedure quite confusing.
Hmm, ....
> Wouldn't it make sense to set the project
> theme in forrest.properties,
Yeah that is how it is done.
> and then have all views, css locations
> etc cascade from that unless specifically overridden?
see my other mail and this since we have based the dispatcher 100% on
the locationmap you are free to override core behavior very easy.
> This would mean
> you could make a copy of a theme, put it in your project themes/
> directory, set the theme in forrest.properties, and then - barring
> putting an .fv file in your xdocs/ directory - do all theme fiddling
> within the theme copy.
That is exactly how it is working. Remember I wrote:
> > If you do and want a fallback for pult you can
> > a) add it to {yourProject}/.../themes/pult.fv
> > b) add it to {yourProject}/.../xdocs/pult.fv
Now a) is the place where you normally would add it.
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)