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?


2 Answers 2


This is considered a VariantField fallback.

Should look something like this:


Community post

Official docs

  • Thanks it worked. Commented Mar 15, 2021 at 6:09

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 and acknowledge you have read our privacy policy.

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