template()
method
This method allows you to split a JSP page into elements which can be included into other JSP pages using the include() method.
Parameters:
Name | Description |
java.lang.String element | The name of the element that should be included, if the JSP page is included using the include() method. |
Example usage:
A JSP template page holding two elements "head" and "foot":
<% com.opencms.flex.jsp.CmsJspActionElement cms = new com.opencms.flex.jsp.CmsJspActionElement(pageContext, request, response); if (cms.template("head")) { <html> <body> This is the template head. <hr> <!-- Main page body starts here --> <% } %> <% if (cms.template("foot")) { %> <!-- Main page body ends here --> <hr> This is the template foot. </body> </html> <% } %>]]>
template()
method
This method allows you to split a JSP page into elements which can be included into other JSP pages using the include() method.
Parameters:
Name | Description |
java.lang.String element | The name of the element that should be included, if the JSP page is included using the include() method. |
Example usage:
A JSP template page holding two elements "head" and "foot":
<% com.opencms.flex.jsp.CmsJspActionElement cms = new com.opencms.flex.jsp.CmsJspActionElement(pageContext, request, response); if (cms.template("head")) { <html> <body> This is the template head. <hr> <!-- Main page body starts here --> <% } %> <% if (cms.template("foot")) { %> <!-- Main page body ends here --> <hr> This is the template foot. </body> </html> <% } %>]]>