How to add a query parameter to generated Clientlibs URLs.
Hi guys,
I would like to know if there is a way to add a query parameter at the end of the generated URLs when loading the Clientlibs.
Consider the following scenario:
This is the code I have to load the Clientlibs.
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html"
data-sly-call="${clientLib.js @ categories='myclientlib'}"
data-sly-unwrap/>
The previous piece of code generates the following script tag.
<script type="text/javascript" src="/path/to/my/clientlib.js"></script>
We currently use Amazon CF to deliver these scripts so I would like to add a query parameter at the end of the URL as a cache busting technique so that the final URL would be like:
<script type="text/javascript" src="/path/to/my/clientlib.js?v=1.3.4"></script>
The value of the query parameter is the version of the project so the cache gets busted for every single release.
Is there a way to add a query parameter at the end of the generated URL?
I was reading the documentation of the clientlibs but couldn't find anything, any help is greatly appreciated.
Thanks.
