2

I'm trying to render SxaTags through Reference in Rendering Variants but it won't render in the front end. I'm trying this in a component that is cloned from the existing Promo component. Sitecore version is 9.2 with SXA 1.9

enter image description here

1

It works quite fine:

enter image description here

The problem you are having is probably related to the fact that you are using Promo rendering which uses its own data sources (not a page where the rendering is dropped - like for example Page Content). Which means you would need to tag Promo data source items (not pages) which make no sense...

  • So you mean SxaTags would not work for Promos? And will work only for components which don't use data sources? Is my understanding correct? – Sumit Upadhyay Oct 7 at 11:59
  • @SumitUpadhyay No... I'm just saying that Page Content is using the current page as the data source by default (when the data source field is empty). We have tags on the pages. When you are using Promo, the rendering variant for promo won't look for tags on the page, it will looks for tags on the Promo data source item (as promo is using it) but the tags are not there. – Dawid Rutkowski Oct 7 at 12:24
  • Yup I got it. But just wondering if there's anyway to make this work for Promo with a data source – Sumit Upadhyay Oct 7 at 18:01
  • You can do it, but you would need to extend Promo data source template with SxaTags filed (there is a base template for that). – Dawid Rutkowski Oct 8 at 10:47
  • 1
    You are complicating your life. Just change the approach, start using tags on pages (like everyone...) and problem solve. – Dawid Rutkowski Oct 9 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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