You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Durrant, Peter" <Pe...@COGNOS.com> on 2002/02/04 14:37:40 UTC
Specifying constants in a sitemap
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="myserver.xyz/login"/>
which is repeated for all my pages.
Can I specify in the sitemap (or elsewhere) a constant (e.g. LOGIN_URL)
having the value: myserver.xyz/whereILogIn/login so that the parameter
becomes:
<map:parameter name="login_url" value=LOGIN_URL/>
This would simplify the maintenance of my sitemaps because the value of
LOGIN_URL could be specified once.
Thanks for your help
Pete
---
Cognos, London, UK
This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so. Thank you.
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: Specifying constants in a sitemap
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Durrant, Peter [mailto:Peter.Durrant@COGNOS.com]
>
> 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="myserver.xyz/login"/>
> which is repeated for all my pages.
>
> Can I specify in the sitemap (or elsewhere) a constant (e.g.
LOGIN_URL)
> having the value: myserver.xyz/whereILogIn/login so that the parameter
> becomes:
> <map:parameter name="login_url" value=LOGIN_URL/>
>
> This would simplify the maintenance of my sitemaps because the value
of
> 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: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}"
...
</map:Act>
</map:pipeline>
2. XML entities:
<map:redirect-to src="&login_url;"/>
Vadim
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>