cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Per Kreipke" <...@onclave.com>
Subject RE: Nested map:parameter sets...
Date Fri, 31 May 2002 17:40:36 GMT
> Not sure why you would need to do this: if you've hardcoded the value, you
> can hardcode it below.

Agreed. It was not really a useful sample; it was a simplified example as I
was testing to illustrate my question about the nesting. After Vadim's
response, I understand a little more.

> If you're not (I assume hardcoding was just
> temporary) you should have access to the parameter from where it was set -
> ie, using a matcher wildcard, or an action, etc.

Right. What I wasn't seeing was a substition in the generator below it and
couldn't understand why.

> What was the final functionality you were looking for?

A way to dynamically choose/load skins and other config information that was
particular to a client.

Eventually that'll be driven from a session or cookie setting but I wanted
to get the snippet in place first, so I thought I could do that all in the
matcher itself.

I've only just figured out that a better pattern is:

<map:resources>
  <map:resource name="clientconfig">
    <map:generate src="config/{client}.xml" type="file" />
    <map:serialize type="xml"/>
  </map:resource>
</map:resources>

<map:match pattern="mypage">
   <map:call resource="clientconfig">
      <map:parameter name="client" value="magnet" />
   </map:call>
</map:match>

And next I'll try to change the matcher to something that'll give me the
client value.

Per


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message