Namastey,
- Sightly means "pleasing to eyes"
- It is new and powerful HTML templating language used in AEM.
- It is expected to be a replacement of JSP and ECMA script, however you will not be able to write complex code using sightly.
- The expressiveness of sightly is intentionally limited as you should be using real programming languages like Java to write complex code.Although you can easily pass inputs via sightly to Java code and also easy to use output from Java code in front-end using Sightly.
Code Syntax :
1. Sightly code is written using dollar sign '$' and braces '{}' ,
e.g ${currentPage.title} where currentPage is a global object and title is a variable.
You can use global objects as listed in [0]
2. You can add sightly as an attribute to any HTML element. In this case dollar sign and braces are not required.
e.g < div data-sly-include="main.html"/> where data-sly is used to indicate sightly language and include is action.
Dhanywaad,
[0] https://docs.adobe.com/docs/en/aem/6-0/develop/sightly/global-objects.html
No comments:
Post a Comment