Good stuff, thanks!  You gave me the general idea -- an internal redirect
with the parameter stuffed into the internal URL.  I had to change your code
a bit to get it to work, here's what I came up with:

Main sitemap:

    <!--
      The URL Z/index.html will either get served from the physical
directory
      A or B, depending on which is present.
    -->
      <map:match pattern='Z/*'>
        <map:select type='resource-exists'>
          <map:when test='A/sitemap.xmap'>
            <map:redirect-to uri='cocoon:/subsitemap-A/cyan/{1}'/>
          </map:when>
          <map:when test='B/sitemap.xmap'>
            <map:redirect-to uri='cocoon:/subsitemap-B/orange/{1}'/>
          </map:when>
          <map:otherwise>
          </map:otherwise>
        </map:select>
      </map:match>

      <map:match pattern='subsitemap-*/*/**'>
        <map:mount uri-prefix='subsitemap-{1}' src='{1}/sitemap.xmap'/>
      </map:match>

Sub-sitemap:

      <map:match pattern='*/index.html'>
        <map:generate src="index.xml"/>
        <map:transform src="simple.xslt">
          <map:parameter name='background' value='{1}'/>
        </map:transform>
        <map:serialize type="html"/>
      </map:match>

It's pretty ugly, though, I think.  Isn't there a (relatively) easy way to
set, say, a request parameter that would be visible in the sub-sitemap?
-- 
View this message in context: 
http://www.nabble.com/Passing-%22parameters%22-to-mounted-sub-sitemaps-tp22218255p22227748.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to