Skip to content

Commit

Permalink
Add config to sitemesh3.xml to allow setting decorator prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
codeconsole committed Aug 27, 2023
1 parent 9bc1fd5 commit a8a9bcb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ public XmlFilterConfigurator(ObjectFactory objectFactory, Element siteMeshElemen
if (customDecoratorSelector != null) {
builder.setCustomDecoratorSelector((DecoratorSelector) getObjectFactory().create(customDecoratorSelector));
}


String decoratorPrefix = xml.child("decorator-prefix").text();
if (decoratorPrefix != null) {
builder.setDecoratorPrefix(decoratorPrefix);
}

// Error pages inclusion
String includeErrorPagesString = xml.child("include-error-pages").text("false");
if ("true".equals(includeErrorPagesString) || "1".equals(includeErrorPagesString)) {
Expand Down
3 changes: 3 additions & 0 deletions sitemesh/src/main/resources/org/sitemesh/sitemesh3.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<xsd:element name="decorator-selector"
type="xsd:string"
minOccurs="0"/>
<xsd:element name="decorator-prefix"
type="xsd:string"
minOccurs="0"/>
<xsd:element name="include-error-pages"
type="xsd:boolean"
minOccurs="0"/>
Expand Down

0 comments on commit a8a9bcb

Please sign in to comment.