Sitecore tip 41: secrets of the SXA Tab component

Did you know that you can do so much more with the Sitecore Experience Accelerator Tab component, other then adding content in the default content field? Yes you can!

If you take a closer look in the Experience Editor you will see that you can select a component around the content.

It is the SXA Page Content component which simply reads the Content field of your tab item. But as you can see it can be removed. And once removed you will see a placeholder under your tab. WHAT?!

Yes, that’s right. You now have a tab component with empty placeholders where you can do the normal things you do. So let’s add three Promo components next to each other.

It’s just magic. And the good thing is that the configuration of the components added to the tab’s placeholder is saved as well. So if you configure a few tabs with components and add it to another page it will be exactly the same. I think I’m going to cry a little.

Sorry, I got carried away. Okey, but how is that possible? Well because these are so called composite renderings. By default the Page Content component is added to the placeholder and reads the Content field of the item it is placed on, which is the tab item. This default behavior is stored in the Shared Layout of the tab’s item under the layout section. By removing the component and adding new onces, these new components are stored in the Final Layout of the tab’s item. Check the image below for details.

And that is how the Tab component works. You will have so much more possibilities now that you know this!