I see that we can add attribute to a link variant tag but not for other tags like div, span etc. Is there a way i can add attribute to these tags without using template variant?

I am trying to add schema attributes as mentioned in this link http://schema.org/JobPosting to all of the variant tags.

Thank you

2 Answers 2



No at this time.


There is an additional field for that on each variant field item (SXA 1.4)

enter image description here

However, for some reason those field values are not used to render data attributes (bug). If you wish you can contact Sitecore support to get hot fix to it or wait till the next release.


I don't think at this time it is possible. I asked Sitecore Support to be sure a while ago (SXA was n v1.3 back then) and they confirmed. You could use NVelocity templates to achieve it, but that is not as nice as using actual variants..

It is now a Feature Request (reference number 7096), but I have no idea where it is on the roadmap. Hopefully they can release a solution for it somewhere soon as I think it would be a big gain (with not so big effort).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.