September 24, 2026

HTL data-sly-include: Including a Script

HTL sly-include

data-sly-include replaces the content of the host element with the markup generated by the specified template file, which can be HTL, JSP or ESP.

For example, a JSP can be included with:

<section data-sly-include="path/to/jsptemplate.jsp"></section>

To include a resource rather than a script, use data-sly-resource.

Back to the HTL tutorial index