For a client, I'm wanting to create a custom RuntimeExtension for HTL. For example, similar to how i18n works in HTL expressions, I'd like to create my own.
I've traced out how HTL markup is actually compiled into Java and have seen how, for example, i18n makes its way into that Java, but I can't seem to get a custom RuntimeExtension to be acknowledged. We are running AEM 6.1 SP2 but some direction to implement such a custom RuntimeExpression in either 6.1 or 6.2 would be great.
Some quick questions:
1) Is there something special I have to do to register a custom extension and, if so, where/how do I do this? I see the ExtensionRegisteryService but it appears to simply pulling in any instances of RuntimeExtensions that are available. How do I make my custom RuntimeExtension "visible" to the ExtensionRegistryService?
2) Is there anything I need to provide other than just the custom RuntimeExtension? I see that i18n has an i18nFilter as well. Do I need to write a filter for my custom extension?
I'll keep poking around and will report back if I find the solution but any help in the meantime would be greatly appreaited. Thanks!
I guess that for now it is not possible, because you should register this extension in Sightly compiler.
But for now it is a final class with whole configuration in its constructor
I also want to do this, is this possible nowadays?