forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: Hiding sections
Date Mon, 20 Mar 2006 22:06:11 GMT
Flavio Cordova wrote:
>>> However, this
>>>approach is much more difficult to implement and requires fairly
>>>detailed knowledge of the internals of Forrest.
> 
> 
> Should I understand this as "forget about it" ? :-D

Either that or it was a challenge ;-)

> Supposing I was crazy enought to try, where should I start ? :-)
> First, how would I flag which sections I wan't to render and which I don't ?

I would recomend using the class attribute for both solutions:

<section class="user">
   <title>some user instructions</title>
   ...
</section>

<section class="dev">
   <title>some dev instructions</title>
   ...
</section>

This way you can easily switch between the two different imemntation 
methods (XSL or CSS) without touching your sources.

Next you need to create a custom skin [1]. The file you will need to 
work with is document2html.xsl

I think I originally suggested passing a parameter in from the sitemap. 
Forget that. My second idea is better, add an attribute to skinconf.xml. 
There are already examples in the above xsl showing how to extract 
settings from skinconf.xml in order to make a decision on what to 
include/exclude in the output.

Note, using skinconf is not really correct. That file should specifiy 
skin configuration, not content. But it will get you up and running 
quickly. If you want to use the "proper" way (forrest.properties). We 
can revisit it when you have the above working.

Ross


[1] http://forrest.apache.org/docs_0_70/your-project.html#skins

Mime
View raw message