Alex R
Alex R

Reputation: 11881

Implementing custom Options in Adobe AEM HTL (formerly known as Sightly)?

This question is about Options, a feature in Adobe's proprietary language HTL:

My simple question: Can I extend HTL by implementing my own custom Options? If so, how?

Upvotes: 0

Views: 519

Answers (2)

Vlad
Vlad

Reputation: 10780

Yes, you can implement your own custom options for an HTL expression. You will need to implement a Filter and add it to the compiler.

But you shouldn't, as:

  1. This is not a designed extension point. You will need to fork the implementation and modify it, thus becoming responsible for keeping it up-to-date further down the road.
  2. You can most probably get the same results by using the public APIs (such as https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md#221-use).
  3. In case you think there's a very good reason for adding or modifying expression options, you can propose an HTL specification change (and also contribute the implementation in Sling).

Upvotes: 2

awd
awd

Reputation: 2322

No. To implement custom options you will have to extend the respective plugin that supports that expression. those classes are not exported by sightly scripting compiler bundle and are not available to be customized.

Upvotes: 1

Related Questions