瀏覽代碼

Exclude /hello & /hello/* urls from sitemesh processing

Lari Hotari 12 年之前
父節點
當前提交
3f79634b48
共有 2 個文件被更改,包括 10 次插入1 次删除
  1. 8 0
      grails/hello/web-app/WEB-INF/sitemesh-excludes.xml
  2. 2 1
      grails/hello/web-app/WEB-INF/sitemesh.xml

+ 8 - 0
grails/hello/web-app/WEB-INF/sitemesh-excludes.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sitemesh-excludes>
+  <excludes>
+      <pattern>/hello/*</pattern>
+      <pattern>/hello</pattern>
+  </excludes>
+</sitemesh-excludes>
+

+ 2 - 1
grails/hello/web-app/WEB-INF/sitemesh.xml

@@ -1,4 +1,5 @@
 <sitemesh>
+    <excludes file="/WEB-INF/sitemesh-excludes.xml" />
     <page-parsers>
         <parser content-type="text/html"
             class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
@@ -11,4 +12,4 @@
     <decorator-mappers>
         <mapper class="org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper" />
     </decorator-mappers>
-</sitemesh>
+</sitemesh>