Is it possible to have parameterized function calls in AEM Use API?

rampai

08-08-2019

I have seen parameters being passed to the Use API while invoking the same in HTL.

e.g.

<div data-sly-use.params="${'params.js' @ value1='feike', value2='visser', seperator=' '}">

  ${params.newValue}

</div>

Is it possible to pass parameters to the Use API function call instead of the API invocation itself?

e.g.

<div data-sly-use.params="${params.js}">

       ${params.newValue @ value1='feike', value2='visser', seperator=' '}

       ${params.newValue @ value1='firstname', value2='lastname', seperator=' '}

</div>

That way we can initialize the use api once and call functions with multiple params in code.

Accepted Solutions (1)

Accepted Solutions (1)

Answers (0)