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
-1
votes
1 answer

AEM: passing properties to sightly component from sling model inside HTML

We have a requirement wherein we need to create a template dynamically using the sling model response. The challenge here is we have got some common components that we want to use for building up our template. Is there a way that I can set the…
-1
votes
3 answers

AEM sling model --Multifield Links component ,MissingElementsException: Could not inject all required fields

AEM sling model --Multifield Links component : MissingElementsException: Could not inject all required fields I am trying to create a multifield link(URL) component - EXTERNAL AND INTERNAL LINKS. See getpageURL() for understanding. See the image…
Kumar Ramela
  • 11
  • 1
  • 6
-1
votes
2 answers

How do I get a selector from a sling Resource

I have two Sling Models: @Model(adaptables = {SlingHttpServletRequest.class, Resource.class}, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL) public class VideoGridItem { @SlingObject private Resource resource; @SlingObject …
Kramer
  • 927
  • 2
  • 13
  • 30
-1
votes
1 answer

Sightly: Adding components dynamically on wcmmode edit

I am using sightly and angular 4 for my AEM project. I have a requirement in which i have a parent component, and on the edit mode, the parent component should have a button to add another pre existing component. I am able to do this without…
Anil Simon
  • 121
  • 1
  • 7
-1
votes
3 answers

How to use angular variable in sightly condition

I am having angular variable in my html page. when I am using {{myVar}} , it is showing the data. I need to use this variable in sightly condition below:
Manan Kapoor
  • 675
  • 1
  • 11
  • 28
-1
votes
2 answers

How to retrieve session values in Sightly/HTL?

I am using Sightly/HTL as the templating language in my AEM project (AEM version 6.3). As Sightly provides a lot of context objects, two of them being : request backed by org.apache.sling.api.SlingHttpServletRequest and currentSession backed by …
Karttik Mishra
  • 150
  • 2
  • 14
-1
votes
1 answer

AEM JSON Endpoint

I'm essentially trying to create an endpoint in AEM which will show certain data about the authored content (what is it, modified date, etc.) with type application/json. An example would be www.example.com/content/jsonData[.json|.html] which would…
skylerto
  • 71
  • 9
-1
votes
1 answer

What is done here. What does this syntax means in sightly?

I am reading the docs about calling clientlibs in sightly. I am not getting the below syntax
Riding Cave
  • 1,029
  • 1
  • 15
  • 32
-1
votes
1 answer

Sightly : throwing null pointer exception for existing method

I am trying to create my own image handle. The class is using a user defined class MySmartImage.java which has com.day.cq.wcm.foundation.Image, and two string properties and their getter setter as follows. public class MySmartImage extends WCMUse…
Kinjal Darji
  • 37
  • 1
  • 7
-2
votes
1 answer

How to create a AEM Search component

How to create a AEM Search component. I need the logic and code for the following parts. Search component HTL code for Input and Results. Model code for searching the "fulltext" using QueryBuilder. Clientlib (if any).
-2
votes
1 answer

How to hide the name of a page from a list if it has no child sub pages in sightly?

I want to display only those pages in the header which have child pages inside them. Using the following code
-2
votes
2 answers

Sightly ul tag closing issue AEM

In Sightly on using ol inside ul tag. All the tags are closing in proper way. But whene I am using Ul inside ul(nested ul) all tags are closing at the end not in proper place. So can any one suggest me. How can I use nested ul in Sightly.
-3
votes
2 answers

How to make a number in html to be clickable so that it will make a call automatically in HTL in AEM

I have a line like this in my HTL Contact: 89569441594 so on my web page if any user wants to call that number by clicking it. Code: {obj.number} how can we use javascriprt to make it click…
-3
votes
2 answers

How to use java class in sightly

i have created a java class in component locally, i am unable to call java class in sightly with arguments. socialfeeds.java package com.zerosix.components.socialfeeds; public class SocialFeeds { public String displayMessage(String val) { …
Noman
  • 4,088
  • 1
  • 21
  • 36
1 2 3
24
25