1

I got a scenario that if a template value is empty(e.g Title),same rendering variant field should render with another template field(e.g description.). Is there a way to achieve this scenario?

0
2

This is considered a VariantField fallback.

Should look something like this:

Example

Community post

Official docs

1
1

Not sure how you have currently defined the variants for Title and Description, but one solution would be to have the two variant fields inside a single variant and then control how they are displayed by using Rules. There is a Rule field on variant fields (depending on the SXA version that you are using) that you can use to show/hide different sections.

enter image description here

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.