You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Helena Edelson <he...@greenjaguar.com> on 2006/01/03 19:56:07 UTC

the forrest.properties-sitemap connection

Hi,

What is actually reading the forrest.properties data?
I am trying to understand if there is more extendability for the 
parameters, for example:
forrest.validate.skinconf.includes=${skinconf-file}
i.e. what in the Forrest engine is parsing and using this or is it Cocoon?

Taking the question a step further, is it possible then to define new 
settings in forrest.properties?
example:
*project.data=${project.content-dir}/content/data*
and if so how might this be referenced in sitemap?
For instance, say you have
     <map:part src="data/scaryalgorithms.xml"/>
which has a path project:content/data as noted above,
what is the parallell between the naming convention in 
forrest.properties and the sitemap entries of:
    *sitemap:        {project:content.data}  *
    *properties:    {project:content.**data**}
*and thus might this work
    <map:part src="*{project:data}*/scaryalgorithms.xml"/>

helps a bit in reusability of setting up new sites with Forrest.

Thankyou,
Helena

Re: the forrest.properties-sitemap connection

Posted by Helena Edelson <he...@greenjaguar.com>.
THank you for taking the time to pass along this immensely clear beta.
 
Helena


Ross Gardler wrote:

> Helena Edelson wrote:
>
>> Hi,
>>
>> What is actually reading the forrest.properties data?
>> I am trying to understand if there is more extendability for the 
>> parameters, for example:
>> forrest.validate.skinconf.includes=${skinconf-file}
>> i.e. what in the Forrest engine is parsing and using this or is it 
>> Cocoon?
>
>
> forrest.properties is a mixture of properties used during the 
> initialisation of the application and during the actually execution.
>
> The validate properties, like the one you select as an example, are 
> used by the ANT script that runs Forrest. Others, such as 
> "project.skin" are made available at runtime via a Cocoon Input 
> Module, which is configured in the forrest.xconf file.
>
>> Taking the question a step further, is it possible then to define new 
>> settings in forrest.properties?
>> example:
>> *project.data=${project.content-dir}/content/data*
>> and if so how might this be referenced in sitemap?
>
>
> Add your property to forrest.properties. If you want to provide a 
> default setting add it to FORREST_HOME/main/default.forrest.properties.
>
> Now find the following element in 
> FORREST_HOME/main/webapp/WEB-INF/xconf/forrest.xconf:
>
> <component-instance name="project" 
> class="org.apache.forrest.conf.ForrestConfModule">
>
> Inside this element there is a <valued> element. Add the following as 
> a child of that element:
>
> <data>@project.data@</data>
>
> Now you can access the value in your sitemap as {project:data}
>
> Couple of points to note:
>
> 1 - Forrest must be restarted to register these changes.
> 2 - When upgrading Forrest the changes to forrest.xconf will be lost, 
> make a local backup as soon as you have it working (something like 
> local.forrest.xconf.backup), this way, it doesn't matter if you forget 
> during upgrade, you will still have a copy.
>
> NOTE:
>
> There is a new config system being developed in 0.8-dev that will 
> simplify this process and allow projects to arbitrarily add properties 
> without editing core files. It is currently working in SVN head, if 
> you are interested join us on the dev list.
>
> Ross
>
>

Re: the forrest.properties-sitemap connection

Posted by Ross Gardler <rg...@apache.org>.
Helena Edelson wrote:
> Hi,
> 
> What is actually reading the forrest.properties data?
> I am trying to understand if there is more extendability for the 
> parameters, for example:
> forrest.validate.skinconf.includes=${skinconf-file}
> i.e. what in the Forrest engine is parsing and using this or is it Cocoon?

forrest.properties is a mixture of properties used during the 
initialisation of the application and during the actually execution.

The validate properties, like the one you select as an example, are used 
by the ANT script that runs Forrest. Others, such as "project.skin" are 
made available at runtime via a Cocoon Input Module, which is configured 
in the forrest.xconf file.

> Taking the question a step further, is it possible then to define new 
> settings in forrest.properties?
> example:
> *project.data=${project.content-dir}/content/data*
> and if so how might this be referenced in sitemap?

Add your property to forrest.properties. If you want to provide a 
default setting add it to FORREST_HOME/main/default.forrest.properties.

Now find the following element in 
FORREST_HOME/main/webapp/WEB-INF/xconf/forrest.xconf:

<component-instance name="project" 
class="org.apache.forrest.conf.ForrestConfModule">

Inside this element there is a <valued> element. Add the following as a 
child of that element:

<data>@project.data@</data>

Now you can access the value in your sitemap as {project:data}

Couple of points to note:

1 - Forrest must be restarted to register these changes.
2 - When upgrading Forrest the changes to forrest.xconf will be lost, 
make a local backup as soon as you have it working (something like 
local.forrest.xconf.backup), this way, it doesn't matter if you forget 
during upgrade, you will still have a copy.

NOTE:

There is a new config system being developed in 0.8-dev that will 
simplify this process and allow projects to arbitrarily add properties 
without editing core files. It is currently working in SVN head, if you 
are interested join us on the dev list.

Ross