Web Maestro Clay wrote:
On Mar 20, 2006, at 9:20 AM, Flavio Cordova wrote:

Is there a way to set any attribute (or something else) to a section
so I could omit it when using forrest site or forrestbot, based on a
parameter ?

Today I use forrest to create an application's user manual. Most of
the information I use to create this documentation is based on use
cases specifications, but this specification has some information that
aren't appropriated to end users. So today I keep two different
documents, one for developers and other for end users (this last one
using forrest)..

So I'd like to unify these two documents and keep it all on Forrest's
format... then, developers will see the full content while end users
will receive the same files without some sections...


I have a similar need. I had thought that forrest:views[1] might provide the answer to the above users and my questions, but I'm not certain.

The Forrest dispatcher (nee views) is dev code so adopt with caution (it is maturing nicely though).

However, it does not really add anything to this use case. The dispatcher is about deciding how a page is structured (i.e. what decorations there are), not really what content appears within the main body of the page.

It would certainly be possible to do this with the dispatcher, but I don't think it is any easier than with the current skinning system.

I would approach this in one of two ways:

a) use CSS to hide the relevant sections - in this case your different outputs of the site would simply use a different stylesheet. The disadvantage is that all the content is visible if a user does "view source". Use a different forrest.properties file for each different version, in which the extra-css element contains your additional CSS classes.

b) create a custom skin in which unwanted content is stripped out according to a parameter passed in via the sitemap. The advantage here is content is not present in the client, so only the content intended for users can be seen with "view source". However, this approach is much more difficult to implement and requires fairly detailed knowledge of the internals of Forrest.

Ross