Commits

Anonymous committed 50215bf

WW-1128: proper variables supported by sitemesh

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2119573baa09-0c28-0410-bef9-dab3c582ae83

Comments (0)

Files changed (1)

src/java/com/opensymphony/webwork/sitemesh/VelocityPageFilter.java

 
 import com.opensymphony.module.sitemesh.Decorator;
 import com.opensymphony.module.sitemesh.Page;
+import com.opensymphony.module.sitemesh.HTMLPage;
 import com.opensymphony.module.sitemesh.filter.PageFilter;
 import com.opensymphony.webwork.config.Configuration;
 import com.opensymphony.webwork.views.velocity.VelocityManager;
 
             // put the page in the context
             context.put("page", page);
+            if (page instanceof HTMLPage) {
+                HTMLPage htmlPage = ((HTMLPage) page);
+                context.put("head", htmlPage.getHead());
+            }
+            context.put("title",page.getTitle());
+            context.put("body",page.getBody());
 
             // finally, render it
             PrintWriter writer = res.getWriter();