HTL Tutorial #1: Introduction to HTML Template Language
Introduction to HTL (HTML Template Language): what it is, why use it in AEM, and first steps with basic syntax.
Read more →All posts with tag Tutorial
Introduction to HTL (HTML Template Language): what it is, why use it in AEM, and first steps with basic syntax.
Read more →Learn to use expressions, identifiers, literals and data types in HTL: strings, numbers, booleans and arrays.
Read more →Complete guide to HTL operators: logical (&&, ||, !), comparison (==, !=, <, >), relational (in) and ternary operator.
Read more →Discover how HTL automatically protects against XSS with context-aware escaping: the 17 available contexts and when to use them.
Read more →Learn how to use data-sly-text to control textual content output and replace all content of an element.
Read more →Complete guide to data-sly-test: how to show/hide elements based on conditions and create if/else logic in HTL.
Read more →Complete guide to data-sly-list: how to iterate over arrays, lists, and collections in HTL with practical examples of loops and list rendering.
Read more →Complete guide to data-sly-use: how to load Java Sling Models, JavaScript scripts, and separate logic from presentation in HTL.
Read more →Learn to create reusable templates with data-sly-template and invoke them with data-sly-call for DRY and maintainable HTL code.
Read more →Complete guide to data-sly-attribute: how to add, modify, and remove HTML attributes dynamically in HTL.
Read more →Learn how to use data-sly-element to dynamically change an element's HTML tag based on data or conditions.
Read more →Discover data-sly-unwrap to remove wrapper elements while keeping only the content: clean and semantic markup in HTL.
Read more →Complete practical guide to multifields in AEM: differences between simple and composite, how to retrieve data in HTL and Java.
Read more →