THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- using <sling:include> tag.
using <% sling.include("\[path to resource\]") ; %> %>Wiki Markup
To use sling:include in a JSP script , you have to use <sling:defineObjects/> tag.
...
The html.jsp can be written in one of the following ways,
If you are using <% sling.include("\[path to resource\]") ; %> create ; %> create html.jsp as follows, Wiki Markup
Code Block |
---|
<%@page session="false"%> <%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%> <sling:defineObjects/> <html> <body> <div id="header"> <% sling.include("/content/header"); %> </div> <h1><%= currentNode.getProperty("title").getValue().getString() %></h1> </body> </html> |
...