HTL Global Objects htl-global-objects
Without having to specify anything, HTL provides access to many objects useful to the developer. These objects are in addition to any that may be introduced through the Use-API.
NOTE
For developers familiar with JSP development in AEM, HTL provides access to all objects that were commonly available in JSP after including
global.jsp.Enumerable Objects enumerable-objects
These objects provide convenient access to commonly used information. Their content can be accessed with dot notation, and they can be iterated-through using data-sly-list or data-sly-repeat.
Variable Name
Description
Backed By
propertiesList of properties of the current resource
pagePropertiesList of page properties of the current page
inheritedPagePropertiesList of inherited page properties of the current page
Java-backed Objects java-backed-objects
The corresponding Java object backs each of the following objects.
Variable Name
Description
componentcom.day.cq.wcm.api.components.ComponentcomponentContextcom.day.cq.wcm.api.components.ComponentContextcurrentContentPolicycom.day.cq.wcm.api.policies.ContentPolicycurrentContentPolicyPropertiescom.day.cq.wcm.api.policies.ContentPolicycurrentDesigncom.day.cq.wcm.api.designer.DesigncurrentNodejavax.jcr.NodecurrentPagecom.day.cq.wcm.api.PagecurrentSessionjavax.servlet.http.HttpSessioncurrentStylecom.day.cq.wcm.api.designer.Styledesignercom.day.cq.wcm.api.designer.DesignereditContextcom.day.cq.wcm.api.components.EditContextlogorg.slf4j.Loggeroutjava.io.PrintWriterpageManagercom.day.cq.wcm.api.PageManagerreaderjava.io.BufferedReaderrequestorg.apache.sling.api.SlingHttpServletRequestresolverorg.apache.sling.api.resource.ResourceResolverresourceorg.apache.sling.api.resource.ResourceresourceDesigncom.day.cq.wcm.api.designer.DesignresourcePagecom.day.cq.wcm.api.Pageresponseorg.apache.sling.api.SlingHttpServletResponseslingorg.apache.sling.api.scripting.SlingScriptHelperslyWcmHelpercom.adobe.cq.sightly.WCMScriptHelperwcmmodecom.adobe.cq.sightly.SightlyWCMModexssAPIcom.adobe.granite.xss.XSSAPIJavaScript-backed Objects javascript-backed-objects
It is possible to back HTL logic with JavaScript. However, the preferred or recommended method is by using .
NOTE
is now deprecated for use with AEM as a Cloud Service. Instead, use the Java Use API.
For more information on deprecated and removed features, see the AEM as a Cloud Service release notes.
recommendation-more-help
experience-manager-htl-help-using