You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Andreas Hartmann <an...@apache.org> on 2005/09/29 09:21:25 UTC
Re: svn commit: r292191 - in /lenya/trunk/src/webapp: global-sitemap.xmap
lenya/resources-shared.xmap lenya/resources.xmap
Renaud Richardet wrote:
> Hello,
>
> Could we add a fallback feature for the modules?
This is already supported.
> Index: src/webapp/global-sitemap.xmap
> ===================================================================
> --- src/webapp/global-sitemap.xmap (revision 292341)
> +++ src/webapp/global-sitemap.xmap (working copy)
> @@ -269,7 +269,7 @@
> <map:pipeline internal-only="true">
> <!-- Enter a module -->
> <map:match pattern="modules/*/**">
> - <map:mount uri-prefix="modules/{1}/"
> src="lenya/modules/{1}/sitemap.xmap" check-reload="true"
> reload-method="synchron"/>
> + <map:mount uri-prefix="modules/{1}/"
> src="fallback://lenya/modules/{1}/sitemap.xmap" check-reload="true"
> reload-method="synchron"/>
> </map:match>
> </map:pipeline>
>
>
> And I was wondering why src="fallback://lenya/modules/{1}/sitemap.xmap
> and not src="fallback://lenya/modules/{1}/{2}
Because you want to mount the module sitemap and send the request there.
You don't want to mount a file which corresponds to the request URI.
> Thanks for any hint.
>
> BTW: Could someone explain me this matcher, thanks (global-sitemap.xmap
> l.385):
> <!-- Enter a module -->
> <map:match type="request-parameter" pattern="lenya.module">
> <map:mount uri-prefix="" src="lenya/modules/{1}/sitemap.xmap"
> check-reload="true" reload-method="synchron"/>
> </map:match>
This way, you can send an arbitrary URL to a module by providing a
"lenya.module=foo" request parameter.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org