Reputation: 21
I use decorator template with sitemesh and have a decorators.xml
file like:
<decorators defaultdir="/WEB-INF/decorators">
<excludes>
<pattern>/styles/*</pattern>
<pattern>/scripts/*</pattern>
<pattern>/images/*</pattern>
<pattern>/index.html</pattern>
</excludes>
<decorator name="layout" page="layout.jsp">
<pattern>/*</pattern>
</decorator>
</decorators>
I want to add more decorators to this file. I must separate their patterns.
Is there any way without adding patterns for all pages one by one?
Upvotes: 1
Views: 828
Reputation: 21
i found the solution for this problem. this xml filters pages top-down. so if you want to write a decorator for only a page, you must write;
<decorator name="layout1" page="layout1.jsp">
<pattern>/page1*</pattern>
</decorator>
<decorator name="layout" page="layout.jsp">
<pattern>/*</pattern>
</decorator>
so layout.jsp does not work for page1, it is filtered at first decorator.
Upvotes: 1