Override Excludes

Timothy Orme <[email protected]> Thu, 17 Jun 2010 12:39:18 -0400
Newsgroups gmane.comp.web.sitemesh.general
Message-ID <[email protected]>
--------------060601080205090600010700
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Sorry if I double post this. I accidentally sent it from a different address than the one I registered to the list with so Im not sure if it worked.

Hi,
     I have a setup where one section of my site is decorated and one is not.

     I have an exclude decoration something like:

     <excludes>
         <pattern>/admin/*</pattern>
     </excludes>

     However, I also have an error page that is redirected to, that I would
like to decorate regardless of where it is generated.
     The way it works right now is:
     If an error occurs outside of/admin/, say at /index.action, then the
browser and url remains at /index.action but an error page is
displayed, with decoration.
     If an error occurs inside of/admin/, like at /admin/edit.action, then
the url remains at /admin/edit.action, an error page is displayed, but
it is NOT decorated, because of the exclude.

     I initially tried to setup a PageDecoratorMapper on the error page
that would force it to use the decorator even if the path was in the
exclude, but the exclude seems to override this regardless of ordering
of the mappers in sitemesh.xml.

     So my question then, is there anyway to override the excludes so that
a page can be decorated based on its content, regardless of the path
it is accessed by?

Thanks,
-Tim


--------------060601080205090600010700
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<pre wrap="">Sorry if I double post this. I accidentally sent it from a different address than the one I registered to the list with so Im not sure if it worked.

Hi,
    I have a setup where one section of my site is decorated and one is not.

    I have an exclude decoration something like:

    &lt;excludes&gt;
        &lt;pattern&gt;<i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>admin<span class="moz-txt-tag">/</span></i>*&lt;/pattern&gt;
    &lt;/excludes&gt;

    However, I also have an error page that is redirected to, that I would
like to decorate regardless of where it is generated.
    The way it works right now is:
    If an error occurs outside of <i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>admin<span class="moz-txt-tag">/</span></i>, say at /index.action, then the
browser and url remains at /index.action but an error page is
displayed, with decoration.
    If an error occurs inside of <i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>admin<span class="moz-txt-tag">/</span></i>, like at /admin/edit.action, then
the url remains at /admin/edit.action, an error page is displayed, but
it is NOT decorated, because of the exclude.

    I initially tried to setup a PageDecoratorMapper on the error page
that would force it to use the decorator even if the path was in the
exclude, but the exclude seems to override this regardless of ordering
of the mappers in sitemesh.xml.

    So my question then, is there anyway to override the excludes so that
a page can be decorated based on its content, regardless of the path
it is accessed by?

Thanks,
-Tim
</pre>
</body>
</html>

--------------060601080205090600010700--