Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 path="/content/header" />
		</div>
		<h1><%= currentNode.getProperty("title").getValue().getString() %></h1>
	</body>
</html>

How to use selectors

 The above examples will assume all your resources are rendered using a html.jsp at each node. Then you might have a question as to how can I use more than one script to work with more than one resource. (sad)

Sling has an answer. The addSelectors parameter in <sling:include /> tag.

...

References:

For more information on other scripting variables look at Common scripting variables page.