HTL Sightly or HTML Template Language
Templating language developed by Adobe
Used for developing AEM components
Integration of presentation logic and business logic
HTL Consist of
i). Expression language: Used to insert pieces of content into the rendered markup.
ii). Block statements : Used to define statements over blocks of markup (conditions/iterations)
ii). Block statements : Used to define statements over blocks of markup (conditions/iterations)
HTL code compiled into Java Servlets, during this process the expressions and the HTL Block data attributes are both evaluated entirely server-side, thus the view source option of HTML page does not show anything.
HTL Syntax
As we already seen There are 2 types of HTL Syntax.
Block statement & Expression language
Block Statement
Block statements are prefixed with data-sly.
Below given the block statements.
HTL sly-test
HTL sly-use
HTL sly-unwrap
HTL sly-text
HTL sly-attribute
HTL sly-element
HTL sly-repeat
HTL sly-list
HTL sly-resource
HTL sly-include
HTL sly-template
HTL sly-call
HTL sly-test
HTL sly-use
HTL sly-unwrap
HTL sly-text
HTL sly-attribute
HTL sly-element
HTL sly-repeat
HTL sly-list
HTL sly-resource
HTL sly-include
HTL sly-template
HTL sly-call
Expression Language
HTL expressions are evaluated at run time and their value is injected into the outgoing HTML stream.
HTL expressions are delimited by characters ${ and }.
HTL expressions are evaluated at run time and their value is injected into the outgoing HTML stream.
HTL expressions are delimited by characters ${ and }.
Below given the Expression Languages.
HTL Variables
HTL Literals(Boolean, Number,Strings,Arrays)
HTL Operators(Logical Operators,Conditional (ternary) Operator, Comparison Operators, Grouping parentheses)
HTL Options(String Formatting,Internationalization,Array Join,Display Context)
HTL Literals(Boolean, Number,Strings,Arrays)
HTL Operators(Logical Operators,Conditional (ternary) Operator, Comparison Operators, Grouping parentheses)
HTL Options(String Formatting,Internationalization,Array Join,Display Context)
Variables
Variables are containers that store data values or objects. The names of variables are called identifiers.
Comments
Post a Comment