You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alter <al...@xs4all.nl> on 2007/12/07 10:36:02 UTC
How to convert global sitemap variables to properties in 2.2
Hi All,
I am trying to migrate a cocoon site to 2.2. My old sitemap used global
variables defined in the sitemap and addressed as {global:varname}.
I already found that global sitemap variables have been deprecated,
and that I should use properties instead.
HOWEVER: after extensive searching I cannot find the correct way to
define such variables in a <name>.properties file, and what that file's
location should be. I tried to set use-default-location to false and set
my own location, but that didn't work either.
So my questions are:
1. Where to put such a properties file?
2. Can the "name" part of "name.properties" be anything or should
it be derived from something?
3. What is the correct prefix to use to specify such a global variable?
Should each line read "%varname=value", or should there be a
prefix referring to a specific block? If so, which block?
Hope someone can give me a clue...
Job Honig
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: How to convert global sitemap variables to properties in 2.2
Posted by Carsten Ziegeler <cz...@apache.org>.
Alter wrote:
> Hi All,
>
> I am trying to migrate a cocoon site to 2.2. My old sitemap used global
> variables defined in the sitemap and addressed as {global:varname}.
> I already found that global sitemap variables have been deprecated,
> and that I should use properties instead.
>
> HOWEVER: after extensive searching I cannot find the correct way to
> define such variables in a <name>.properties file, and what that file's
> location should be. I tried to set use-default-location to false and set
> my own location, but that didn't work either.
>
> So my questions are:
>
> 1. Where to put such a properties file?
You can put it in your block (jar file) under META-INF/cocoon/properties
or in your web application under WEB-INF/classes/cocoon/properties
> 2. Can the "name" part of "name.properties" be anything or should
> it be derived from something?
It can be anything, but it should be a valid filename of course :) Keep
in mind that property files are processed in alphabetical order.
> 3. What is the correct prefix to use to specify such a global variable?
> Should each line read "%varname=value", or should there be a
> prefix referring to a specific block? If so, which block?
You can use any name, so no prefix required - all properties
used/defined by Cocoon itself will have the prefix "org.apache.cocoon"
so there shouldn't be any name clashes.
HTH
Carsten
--
Carsten Ziegeler
cziegeler@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org