forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: easily insert CSS for a single file?
Date Wed, 21 Mar 2007 22:14:38 GMT
On Wed, 2007-03-21 at 18:19 +0000, Stuart Yeates wrote:
> I'm playing with converting an HTML table into a CSS table (for better
> accessibility, comply with local guidelines, etc) and would like to
> know where to put the CSS to give it the narrowest scope possible
> (ideally a single file or class of files). 
> I'm not keen to update the global CSS files because I'm aware that CSS
> can require a lot of platform- and browser-specific tweaking and I'd
> rather not break things for everyone. 

On Wed, 2007-03-21 at 18:48 +0000, Ross Gardler wrote:
> I can add a little info to Stuarts needs as he is a colleague (but I do 
> not know the answer). We are using the dispatcher, currently a 
> customised version of the pelt theme.

If you are using the dispatcher have a look at:

The important part in short:
1) you need to define a url specific structurer:
<!-- CSS View of the request e.g. index.dispatcher.css -->
  <forrest:view type="css" hooksXpath="/">
    <!--Use/define css contracts in themes/yourPelt/css/ -->
2) Activate the css link to the url specific css.
<!-- HTML View of the request (e.g. index.html)-->
  <forrest:view type="html" hooksXpath="/html/body">
    <forrest:contract name="branding-css-links">
      <!-- More information around this contract
      <forrest:property name="branding-css-links-input">
        <!-- You can request url specific css as defined above, 
          but beware that you need to use the *.dispatcher.css extension!!!-->
        <css prefix="" url="#{$getRequest}.dispatcher.css" media="screen" theme="Pelt"/>

This scenario will create to each html file a corresponding css file. e.g. requesting: index.html
will as well produce index.css.

I do not think this is what you want. 

Like I understand your mail you are looking for a file specific css (but only one). 

If you are testing your css you want to do only on one page, why not create an url specific
e.g. ${project.resources}/structurer/url/index.fv. 

Did you see

Thorsten Scherler                       
Open Source Java & XML                consulting, training and solutions

View raw message