0

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?

Alex R
  • 11,364
  • 15
  • 100
  • 180
  • If you have a specific requirement you are trying to implement, please list it. There might be a better option that extending HTL options. – Ahmed Musallam Jun 26 '18 at 07:16
  • The possible requirements are too many too list, but the one I had in mind when I asked the question 4 days ago, is that I would like to re-implement the `extension` option correctly (making it content aware). – Alex R Jun 26 '18 at 21:39

2 Answers2

2

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).
Vlad
  • 10,602
  • 2
  • 36
  • 38
1

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.

awd
  • 2,302
  • 1
  • 22
  • 29