cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <>
Subject RE: Specifying constants in a sitemap
Date Mon, 04 Feb 2002 20:36:08 GMT
> From: Durrant, Peter []
> Hi
> I'd like to be able to specify some constants in a sitemap for use as
> parameter values to an action.
> For example, I currently have a parameter for a login action:
> 	<map:parameter name="login_url" value=""/>
> which is repeated for all my pages.
> Can I specify in the sitemap (or elsewhere) a constant (e.g.
> having the value: so that the parameter
> becomes:
> 	<map:parameter name="login_url" value=LOGIN_URL/>
> This would simplify the maintenance of my sitemaps because the value
> LOGIN_URL could be specified once.

There is nothing like this in current sitemap implementation. Can
suggest you two ways around this problem:

1. Use action to set parameters as the top element in the pipeline:

  <map:act type="set-param or something">
    <!-- define -->
    <map:parameter name="login_url" value="......"/>


    <!-- use parameter. Count levels and put correct amount of "../" -->
    <map:redirect-to src="{../../../login_url}"


2. XML entities:

    <map:redirect-to src="&login_url;"/>


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message