I have this such a list:
//properties.datas
data-hello="sup"
data-world="w00rld"
Can I generate a tag and loop all the data attributes into there? I only understand how to generate multiple HTML tags.
Result:
<div data-hello="sup" data-world="w00rld">
You can pass a map to
data-sly-attribute
and it will render all corresponding pairs as attributes:key="value"
. See https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#223-attribute