### Eclipse Workspace Patch 1.0
#P magnolia-templating
Index: src/main/java/info/magnolia/templating/elements/AreaElement.java
===================================================================
--- src/main/java/info/magnolia/templating/elements/AreaElement.java (revision 54613)
+++ src/main/java/info/magnolia/templating/elements/AreaElement.java (working copy)
@@ -254,7 +254,15 @@
webContext.push(webContext.getRequest(), webContext.getResponse());
setAttributesInWebContext(contextAttributes, WebContext.LOCAL_SCOPE);
try {
- renderingEngine.render(areaNode, areaDefinition, contextObjects, new AppendableOnlyOutputProvider(out));
+ AppendableOnlyOutputProvider appendable = new AppendableOnlyOutputProvider(out);
+ if(StringUtils.isNotEmpty(areaDefinition.getTemplateScript())){
+ renderingEngine.render(areaNode, areaDefinition, contextObjects, appendable);
+ }
+ else{
+ for (ContentMap component : components) {
+ renderingEngine.render(component.getJCRNode(), appendable);
+ }
+ }
} finally {
webContext.pop();
webContext.setPageContext(null);