0

I am using an SXA component to render fields from current page. But it seems rendering variant renders fields only from datasource item.

In my case, datasource is empty as I need to render fields from current page item so it does not renders anything.

As a work around I am passing a dummy datasource and then in scriban template, I am assigning current page to current item like: i_item=i_page

Please suggest if there is a better solution to this.

1 Answer 1

2

If you want to make the rendering variant access the current page, mention the datasource "page:" enter image description here

1
  • 1
    It worked. Thanks :) Aug 26, 2022 at 15:50

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.