Questions tagged [sightly]

Sightly (now known as HTL) - the Apache Sling XSS-aware template language

Sightly is an HTML 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-side scripting by supplying sensible defaults and anti-XSS filters.

374 questions
3
votes
0 answers

Creating a custom adaptive form component - that will submit and store data

Is it possible to create a new adaptive form component in HTL/sightly or extend an existing component? Basically just trying to create a dropdown component (or any other component) that populates its values from a java model and will be saved to crx…
sootballz
  • 31
  • 4
3
votes
1 answer

Content altered in HTL/ Sightly in AEM 6

This is the weirdest issue I've ever faced in a long time. I have a URL that is authored inside a multifield. The URL has an underscore eg. http://example.net/_pinkPanther_is_pink it is currently inside ${item.link} When I do
Oliver
  • 6,152
  • 2
  • 42
  • 75
3
votes
3 answers

How access nested child attributes from a list in Adobe AEM using sightly?

I am trying to access a list of items having 'title' and 'url' in them. I want to access the 'item' or 'url' but not sure how to. The child items are accessible but with: ${child} // prints like this {"title":"Hello","url":"www.hello.com"} but…
ambar
  • 2,053
  • 6
  • 27
  • 32
3
votes
1 answer

Pass parameters to data-sly-include in sightly/HTL

I have a piece of Sightly/HTL code as follows -
3
votes
1 answer

Sightly not recognizing html

I have method which is returning html as a string value. I thought while displaying it will show me string in bold on browser but its showing me the string as is on browser. public String getHtml() { return "kunal"; }
Kunal_89
  • 309
  • 1
  • 2
  • 10
3
votes
2 answers

HTL -how to display a page on another page like popup / modal

I'm trying to use existing page (selected with pathbrowser from TouchUI) as a popup / modal on my HTL page. Is there a way of adding / injecting HTML from different file using sightly ? It's more about sightly and rendering that html on the page…
fernando
  • 814
  • 1
  • 9
  • 24
3
votes
2 answers

Ng-repeat in Sightly

I am trying to populate drop-down values using ng-repeat in Sightly. The AEM node saves my data as String array and I am able to fetch it properly, but not able to populate them as it throws "? undefined:undefined ?" error. My code:
3
votes
2 answers

in Adobe CQ (AEM) how to iterate through a list of resources using `data-sly-list` and `data-sly-resource` in sightly?

In AEM 6.1, with a structure like this: - Page - form node - parsys - node 1 - node 2 - ... - node n The original form has the following code which works
Jason
  • 311
  • 4
  • 16
3
votes
5 answers

How do I use a sling service in sightly page without using javascript?

I have to use a sling service that I created e.g. @Component @Service public class SearchServiceImpl implements SearchService { public SearchResults search() { SearchResults results = new SearchResults(); ..... return results; …
Kinjal Darji
  • 37
  • 1
  • 7
3
votes
3 answers

AEM 6.1 Sightly Java class does not update on build

I have recently started using Sightly in AEM 6.1, which allows the Java files to be located in the same folder as the component and use the WCMUse class. However, I am noticing that whenever I do a Maven build that involves a change to one of those…
Vortexcalm
  • 41
  • 5
3
votes
1 answer

Condition statements in sightly

In the Sightly templating language, for Adobe AEM6, how do I use a specific class if a condition is true? ${properties.reduceImage} is my checkbox, so if the checkbox is checked then add the class if not then it doesn't return anything. I'm not…
Code4life
  • 67
  • 1
  • 1
  • 11
3
votes
1 answer

Evaluating expression and pass as argument in Sightly AEM

I have the following Sightly expression:
  • The dynamiclink template is as…
    Ashley
    • 2,256
    • 1
    • 33
    • 62
    3
    votes
    1 answer

    Call OSGi service from sightly javascript use function

    I am trying to access an OSGi service from a sightly javascript use function. Through the sling SlingScriptHelper. I can call the sling.getService(Service.class) method from javascript, but I do not know how to specify the class in javascript. …
    diffa
    • 2,986
    • 1
    • 22
    • 35
    3
    votes
    2 answers

    How can list elements be looped under