Extending SXA

Abstract

Requirements and recommendations for extending SXA.

You might want to extend SXA, for example, to add your own custom rendering to the SXA toolbox, add a theme, or a template.

Note

We recommend that you do not change the default SXA items because those changes will be overwritten after installing a new SXA version.

This topic describes some of the general rules for adding content to the SXA database and changing code:

SXA follows the Sitecore Helix principles that contain development process recommendations for building, testing, extending, and maintaining Sitecore implementations. One of the Helix principles is that each module has a separate location in the content tree:

{PATH_TO_SITECORE_LOCATION}/{LAYER}/{PRODUCT}/{MODULE}

For example:

/sitecore/templates/Foundation/Experience Accelerator/Multisite

Where:

Parameter

Example value

Description

PATH_TO_SITECORE_LOCATION

/sitecore/templates/

Path to the location where project-specific items will be stored

LAYER

Foundation

Helix recognizes several different layers: Project, Feature, Foundation

PRODUCT

Experience Accelerator

Optional. Additional level of nesting for better organization of all SXA modules under a single folder.

MODULE

Multisite

Module name.

You can add new templates for specific projects. This can be convenient if you are working on a project that needs custom templates. You can add your project templates to: /sitecore/templates/Project/Project_Name

You can extend the logic of SXA processing pipelines and message events with your own implementation. You can extend and customize the pipelines by adding or replacing processors.

Note

If you want to change or extend any of the SXA functionality, you must patch it in a correct way, using Sitecore patch configuration files.