HTL file paths as variable
In some of my HTL files i am using a use api script, which is in path /apps/level1/level2/file.js. To call this script from my HTL file, i am using the following code.
<div data-sly-use.file="${'/apps/level1/level2/file.js' @ args=something}">${file}</div>
I am doing the same thing at different parts of the same or different HTL file. is there anyway i could use a seperate template like file to store these paths, then call them at the necessary HTL files like.
<sly data-sly-include.variable="variables.html"/>
//rest of the code
<div data-sly-use.file="${variable.file1 @ args=something}">${file}</div>