Closed henrykuijpers closed 11 months ago
i've a proposal in #2 - can you give it a try?
<sly data-sly-use.clientlib="/apps/wcm-io/wcm/ui/clientlibs/sightly/templates/clientlib.html"
data-sly-call="${clientlib.css @ categories=['my-clientlib-category'],
customAttributes=['attr1=value 1','data-attr2=5','attr3']}"/>
<sly data-sly-use.clientlib="/apps/wcm-io/wcm/ui/clientlibs/sightly/templates/clientlib.html"
data-sly-call="${clientlib.js @ categories=['my-clientlib-category'],
customAttributes=['attr1=value 1','data-attr2=5','attr3']}"/>
@henrykuijpers is this still relevant? can you have a look at the PR?
Oops! totally forgot about this one. Yes, this is still relevant. :) I'll review the PR. :)
It would be nice to be able to set additional attributes on the rendered script/link tags.
In our case, we want to specify "rel" and "title", and also "data-contrast" to indicate that our stylesheet is for the contrast option.
It would be good to change the HTL helper, for example by allowing the specification of a map (or similar), so that any attributes can be specified and we don't have to deal with a hardcoded list of supported attributes. This way, we don't have to do code changes when something new needs to be supported.