Saturday, February 22, 2020

SXA - High-level tree structure and steps for the theme extension.

SXA has a highly flexible structure, and it follows the Sitecore Helix principles that contain the best development process and structure for the building, testing, extending, and maintaining the implementations.

Before going further, I would like to mention the basic structure of SXA and what is required and recommendation to extend the theme.

Here is the high-level view for the SXA tree structure including content, media library and templates.




Steps to extend the SXA theme.

We can extend the theme by creating a theme extension and using the Attach Theme Extension or the Extend Site Theme action.

Extnstion theme allows us to extend the base theme without any modification to the base theme. And this can be attached to an existing site to override the part of the theme/design.

Steps - go to this path /Sitecore/media-library/Extension Themes and create a new theme.




New extended them structure will be like this -





Upload a file for fonts, images, scripts or styles.


We must use the extend site theme action to extend the existing/ or new site theme, and it will be added automatically.

There are two ways to attach the extended them to the site.

One is to create a separate module and install it. You can find more details here - Extend by a separate module, the second option is to navigate to System\Settings\Feature\Experience Accelerator and add an item extend site theme, 


To deploy them separately, we must use Attach Theme Extension action.

Create a new Attach Theme Extension and select below two values, the first field name is 'Theme that is extended' and the second one is  'Extension Themes'.

Save and refresh the experience editor. Extension theme will be applied.