0

I want to add <button> tag in Rendering Variants tag list so that my link renders as <button> and NOT as <a href>

When I manually add the button tag in the enum list path (which I don't prefer): /sitecore/system/Settings/Foundation/Experience Accelerator/Rendering Variants/Enums/Tags

I get the rendered variant with button as empty

enter image description here

or

enter image description here

Is there anyway to render just <button> along with all the properties?

3
  • 1
    What properties do you want on the button? and why do you want a link rendered as a button. Semantically, if the click changes navigation, it should be an a tag.
    – Richard Seal
    Commented Feb 25, 2020 at 15:42
  • Hello @RichardSeal our design team has defined a separate css class each for <button> and <a> tag. But we are trying to resolve this issue. Was also curious to know if we can add some HTML5 elements to the tag list (if required) Commented Feb 26, 2020 at 13:02
  • Why not just add the btn css classes to the A tag in your rendering variant. It would look the same and behave properly
    – Richard Seal
    Commented Feb 26, 2020 at 14:08

0

Your Answer

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

Browse other questions tagged or ask your own question.