Share data sources and presentation using the multisite feature

SXA lets you share styles, data sources, page designs, partial designs, and variants between the sites within one site collection. This is helpful if you want to impose the styling of a master site on your local sites or if you want to be able to use data sources from other sites.

Examples:

  • You have a main site and many subsites and you want all sites to use the same styles, the same footer, and the same variants.

  • You want to share data sources, for example promos or videos, between your sites.

Make a site a shared site

Note

Use the Content Editor for the steps described in this section.

It can be convenient to arrange the styling of your sites by sharing the presentation of one master site. If you want to use a master site that imposes styles and variants, you could consider having a master site that is not one of the publicly available sites but rather a container for the shared items.

To make a site a shared site:

  1. Navigate to the site collection and scroll down to the Sharing section.

  2. In the Sharing section, double-click the site that you want to share to move it to the Selected pane. The other sites within the same site collection can now use its presentation and data sources.

    Note

    You can share as many sites as you want. However, if you are sharing more than one site, you must pay special attention to the naming of your site data because otherwise finding the correct item from the correct site can be difficult.

Use presentation items from a shared site

Note

Use the Experience Editor for the steps described in this section.

By default, adding a shared site implies that the following presentation items can be shared from that site: page designs, partial designs, and variants.

To use a page design from a shared site:

  1. Navigate to the page that you want to assign a page design to.

  2. In the Page design list, select the page design from the shared site. Similarly, if you want to map page designs to page templates, you can select the master site page designs or page designs that you created locally.

    Specify a page design.

You can use partial designs from your local site and from the shared site at the same time. This can be convenient when you, for example, want to use the header and footer of the shared site together with the local partial design for an article. To mix partial designs from local sites and shared sites, you can add them to your page design.

For example, the following page uses partial designs from both the local site (Footer for subsite) and the shared site (Master site footer and Master site header):

Example of usage of both local partial designs and shared site partial designs.

If you want to use global styling, you can delete all styles on all local sites and share the styles of the master site.

To use styles from a shared site only:

  1. In the Content Editor, navigate to the local site or sites and click > Presentation > Styles.

  2. Delete the styles. Then, when you apply styles to a component in the Experience Editor, the only available styles to select are the ones from the master site.

    Master site styles example.

Use data sources from a shared site

Note

Use the Experience Editor for the steps described in this section.

Most SXA components are designed for reusability and pull data from data source items. This means that the content they display is not bound to the page on which they appear but is stored in data source items. By using the multisite feature, you can now share data sources between the sites of a site collection.

For example, for the Promo component, you can select promos from both the master site as well as from your local site:

Select the Associated Content dialog box.
Note

To avoid users having to change the data source on all sites that a data source item appears on, you must set the security on data source items.

When available, you can select variants from both the local and the shared site.

Select a variant from both local and shared site example.

Do you have some feedback for us?

If you have suggestions for improving this article,