0

I must (project requirement) create some markup directly in Javascript on the server side and then integrate it into the HTL output without further modification.

The following two-liner works for me:

<sly data-sly-use.markup="${'render.js'}" />
${markup @ context='unsafe'}

But I am wondering if there is a way to shorten it further?

In the Adobe documentation I find other sly- block statements like sly-template and sly-resource that can include the output of some other HTL or JSP file directly, but is the same also possible with a Javascript file?

Like this:

<sly data-sly-magicmagicmagic="${'render.js'}" />

?

Vlad
  • 10,602
  • 2
  • 36
  • 38
obelix
  • 189
  • 1
  • 6

1 Answers1

0

No, there is no such thingamajig ;)

You can however write it a bit nicer as

<sly data-sly-use.markup="${'render.js'}">${markup @ context='unsafe'}</sly>

I stronly suggest you use the html context though.

Vlad
  • 10,602
  • 2
  • 36
  • 38