Questions tagged [htl]

HTL (HTML Templating Language, formerly known as Sightly) - the Apache Sling XSS-aware template language

HTL (HTML Templating Language, formerly known as Sightly) is an XSS-aware templating language that was introduced in Adobe Experience Manager 6.0 and later donated to Apache Sling. Its distinguishing features are a tight integration with Sling and helping make your HTML immune to cross-site scripting by supplying sensible defaults and anti-XSS filters.

94 questions
0
votes
2 answers

How do I format a string for use in an inline script rendered as HTML?

I have the following properties string GET 50% OFF ANY M'EDIUM OR L"AR"GE PIZZA! I am using it in an HTML onclick markup like so onclick="trackPromoCta(encodeURI(${properties.ctaTwoTextRight @ context='text'}));" However this outputs invalid html. I…
James
  • 235
  • 3
  • 15
0
votes
3 answers

AEM property displays correctly in

but not in href attribute

I'm making a custom multifield breadcrumb component with this code.
0
votes
1 answer

AEM sightly conditional rendering with '&&' operator

i'm trying to display two different set of script pased on existence of propriety model in sightly AEM. Is this use of && operator correct?: something inside…
Pds Ink
  • 765
  • 2
  • 12
  • 38
0
votes
1 answer

What is the best way to ensure a component's client lib files only load on the page when the component is present?

I'm new to AEM. Currently we have one template for each page on our site. All components have the category "project_name.components" and I am calling the client libs in a header file with:
Holly Michelle
  • 95
  • 2
  • 15
0
votes
1 answer

How to pass dialog property value to AJAX request in sightly JAVA Script USE API.?

Am using server-side JavaScript USE API to read the dialog properties like below use(function () { var myproperty = properties.get("renderpagetype"); return { callajaxvariable: myproperty, }; }); How to pass/get this dialog property value and call…
krish
  • 469
  • 1
  • 15
  • 34
0
votes
1 answer

How to create page detail in AEM 6.1

I want to create a page detail of product containing the following information such as name, ID, type, status, quantity, description etc by AEM 6.1. But it seems difficult to me. Assuming there is a table of product list. Once clicking the Read One…
Lee Dat
  • 155
  • 1
  • 6
  • 20
0
votes
1 answer

How can I split AEM multifield component results from a string to an array

I created a custom component in AEM using the multifield functionality. However, it automatically places the values in a long string with commas in between. I have gotten the values in an array using a custom JS file, but still can't figure out how…
Holly Michelle
  • 95
  • 2
  • 15
0
votes
2 answers

AEM 6.3 Using OSGi R6 Annotations and Sling Models

I am trying to create an OSGi Service using OSGi R6 annotations and then injecting it in the Sling Model class like this: package com.aem.sites.models; import javax.annotation.PostConstruct; import javax.inject.Inject; import…
user972418
  • 817
  • 3
  • 25
  • 58
0
votes
1 answer

AEM - Unable to see edit option in component

Here is the code I have written in HTL file footer.html I am using editable template here.
user972418
  • 817
  • 3
  • 25
  • 58
0
votes
3 answers

AEM HTL looping using data-sly-repeat