Wednesday 14 June 2017

Javascript Use API Example


  • HTL ( previously known as Sightly ) focuses on separation of concerns. 
  • UI Developers shouldn't worry about back-end logic as they use to be with JSPs,
  • With HTL back-end logic should come from Java or Javascript.
  • As a HTL Developer , you are provided with Use API  you can simply call logic by data-sly-use operator.
  • Syntax: 
    • data-sly-use.objectName =" JAVA class  /Java script name "
  • An object is created and that object can be used for accessing properties returned by Java or javascript.



Basic Sling Model Exporter

/* Open a page which is having component /apps/project/components/page/page /content/project/en/jcr:content.model.json Don't miss...