Re: Override Excludes
Timothy Orme <[email protected]> Mon, 21 Jun 2010 10:19:31 -0400
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <[email protected]> |
Ah excellent! Didn't even think of this. Thanks! On 6/19/2010 2:56 AM, Joe Walnes wrote: > Hi Tim, > > The<excludes> tag will prevent SiteMesh from intercepting the > response, so you'll have to take a different approach. > > Instead of using<excludes>, you can achieve a similar thing by adding > to decorators.xml: > > <decorator name="none"> > <pattern>/admin/*</pattern> > </decorator> > > This is similar, but because the path will still be processed by > SiteMesh, you should be able to use it in conjunction with the > PageDecoratorMapper. So putting this in your error page will force > SiteMesh into action: > > <meta name="decorator" content="/my/decorator"> > > thanks > -Joe > > On Thu, Jun 17, 2010 at 5:39 PM, Timothy Orme > <[email protected]> wrote: > >> 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 >> >> > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]