I would like to add class name in redirect url anchor tag. Is it possible ??
Could someone let me know how redirect url create a anchor tag and where is the code of it?
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityI would like to add class name in redirect url anchor tag. Is it possible ??
Could someone let me know how redirect url create a anchor tag and where is the code of it?
SXA redirects
should not be used normally for any links generation. Their purpose is completely different.
When you create a this-url-should-be-redirected
redirect item and configure its Redirection URL
to some-another-link
, when someone tries to open https://yourwebsite/this-url-should-be-redirected
, browser will redirect them to https://yourwebsite/some-another-link
.
You can read more here: https://doc.sitecore.com/xp/en/users/sxa/17/sitecore-experience-accelerator/redirect-a-url.html
To add a class in an anchor tag, Sitecore
provides you with the OOTB
option to do this. So when you click on the insert link, you can find the option to add a class name
And if you want to do some customization then you have to create your own processor and then need to register this. To know more about this, you can follow these links.
https://sitecorejunkie.com/2015/10/10/add-a-custom-attribute-to-the-general-link-field-in-sitecore/