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
5
votes
2 answers

AEM 6.1: Enable Rich text editor (RTE) plugins on Touch UI

for classic UI we can easily add the plugins inside rteplugins tag, Adobe built a great example on their Geometrix-Outdoor project:
Tien Nguyen
  • 4,298
  • 9
  • 30
  • 44
5
votes
2 answers

How to add conditional elements in data-sly-list?

I currently have a data-sly-list that populates a JS array like this: var infoWindowContent = [
Anthony
  • 33,838
  • 42
  • 169
  • 278
5
votes
2 answers

AEM 6.1 Sightly basic form submit and redirect to same page

I am trying to do the following on AEM 6.1: Develop a simple form (3 input fields) Process the submitted values, And redirect to the same page with processed values/result I am able to submit the values to a servlet, and process them (business…
Suren Konathala
  • 3,497
  • 5
  • 43
  • 73
5
votes
2 answers

How to invoke the non-getter methods in sightly?

I want to invoke non-getter methods in sightly, is that possible? For example, HashMap.size()
5
votes
1 answer

Expression Option Sightly

I was looking over the expression options used in sightly. I tried the below line of code, but it seems just render the text over the page, can someone provide use of options with some good examples. ${'Assets' @ i18n, locale='fr-CH',…
Vivek Dhiman
  • 1,967
  • 6
  • 46
  • 82
5
votes
3 answers

Setting emptyText on a parsys from Sightly (AEM6)

In Sightly/AEM6, when including a parsys component, how can I set the text that says 'Drag Components Here' (cq:emptyText) to use a localised string? I have several parsys components as children of a custom component and need different text for each…
Alasdair McLeay
  • 2,572
  • 4
  • 27
  • 50
4
votes
2 answers

AEM Sightly - Is it possible to create custom data-sly attributes?

I was wondering if there is a way to create custom attributes, e.g.:
Just like custom JSP tags. EDIT: As of May 4, 2014, it was not possible, according to this blog. Is there any news on this?
Alfeu
  • 971
  • 9
  • 12
4
votes
2 answers

Display different markup in Sightly based on a Sling selector

The context I'm working on an AEM 6 project that uses Sightly as the templating language. I'm facing a use case, in which I want to show or hide certain parts of the markup depending on the presence of a Sling selector. For example, a request to…
toniedzwiedz
  • 17,895
  • 9
  • 86
  • 131
4
votes
2 answers

Debugging Sling/Sightly server-side JavaScript

I am trying to debug JavaScript that is stored in the JCR and run on the server with Rhino, by the Sightly templating language's JavaScript UseAPI. As per the instructions provided in sling.properties: # To enable the current server side debugging…
Alasdair McLeay
  • 2,572
  • 4
  • 27
  • 50
4
votes
2 answers

AEM 6.0 Sightly Child Nodes

I have a question around using Sightly to access child nodes of a component. I have a template which pulls in a basic image component using data-sly-resource, like so.
Harry Northover
  • 553
  • 1
  • 6
  • 24
4
votes
3 answers

Cannot get/set data from sling models

We have sling model. For example @Model(adaptables=Resource.class) public class MyModel { @Inject private String propertyName; } public Image getPropertyName) { return propertyName; } Also we have added
MastAvalons
  • 1,150
  • 1
  • 14
  • 23
4
votes
1 answer

AEM6 (CQ) sightly passing through variable via template into javascript

I'm using the new sightly language in AEM6 to render my components using templates, in my component there is a video that uses the JWPlayer plugin which needs the following code to initalise the video:
Tom Maton
  • 1,564
  • 3
  • 23
  • 41
3
votes
1 answer

Retrieve thumbnail URL from page properties in AEM 6.4 using sightly

Is it possible to insert thumbnail image URL from page properties of Thumbnail tab into og:image inside meta tag. I am able to get values of pageTitle and description properties but not the image. Or is there a better way to handle this?
hitcher
  • 33
  • 6
3
votes
3 answers

AEM: Access JS File in DAM using JavaScript Use-API

I have a certain JS File in DAM, that contains a JSON. I would like to access that file in the helper JS using any methods of JavaScript USE API in Sightly. I know it can be done using Java quite easily, but I would like to do it in a manner that I…
Akshay Rathnavas
  • 338
  • 4
  • 16
3
votes
1 answer

Date type required in AEM HTL / Sightly date formatter

I've seen that since AEM 6.3, date formatting has been natively supported in the markup, like so: ${ 'dd~MMMM-yyyy' @ format=currentPage.jcr:created } (Reference: https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#1222-dates ) I have…
ronx
  • 89
  • 2
  • 7
1
2
3
24 25