Depending on exactly how dynamic this sidebar should be you could include taxonomies for certain pages. Then use twig to check the page’s taxonomy and based on that either display ‘abc’ or ‘xyz’.
just create a new taxonomy in the admin panel, or directly into the site.yaml file (see your config folder).
let’s assume you create a taxonomy called ‘sidebar’
then add the following to the frontmatter yaml of the page you wish to include
taxonomy:
sidebar:
- 'yes'
then you should be able to call it through a twig expression:
{% if page in taxonomy.findTaxonomy({‘shortcut’:‘yes’}) %}
// do this
{% else %}
// do this
{% endif %}
Im not 100% sure about the above twig expression but I can’t test it out for you right now. The idea above should work, im just not sure if the expression is completely correct… maybe someone else can confirm if the above would be the correct way or try fiddle around with it a bit!