Skip to content

davidjgonzalez/htl-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 

Repository files navigation

htl-examples

AEM HTL examples

AEM compatibility

The package is only compatible with AEM6.3, this because new features are used that are only available in AEM6.3

  • Exporter (sling-models)
  • getInheritedPageProperties() in WCMUsePojo
  • getLanguage() in Page-api

Included examples

Provides an example of a CustomBindingProvider, this if you want generic objects available in HTL

Example on using a Map<> together with HTL

Code sample on using a LinkedList with HTL

Example on using Exporter-annotation with Sling-Models

How to get a request parameter in HTL

Validating HTL-files during build process

Example on using AutoCloseable functionality, no need to close ResourceResolvers in code

Formatting your date-objects in HTL

Formatting numbers in HTL

Example that shows the resolution of resources directly in HTL

Passing in request-attributes to data-sly-resource

Example of the OSGi annotations, easy way to define OSGi properties. Properties defined in MyServiceConfiguration.java, default config here

Use of a lambda expression that is supported in Java8

About

AEM HTL examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 55.8%
  • HTML 22.8%
  • CSS 11.1%
  • JavaScript 10.3%