The following table summarises the configurations that make texts on a page editable through the Experience Editor and the page itself searchable through indexes, depending on where the text is stored and how it is referenced.
The table above may be self-explanatory for some people. Other may need further explanations to understand it. If you are from the first group you may not need to keep reading. The following paragraphs explain a bit more the concepts involved around the table above.
Let's make first a quick introduction to the available options to display text on a page with SXA.
Options to display text on a Page
A page always displays text through components. It can do it with components that are directly in its page renderings or it can do it indirectly through Page Designs (a new concept in SXA).
The Page Design is an important artifact introduced by SXA that provides layout management and reusability. It allows associating page layouts to page types, instead of using the old approach of renderings within the page template.
A Page Design contains a combination of Partial Designs. A Partial Design represents an area on a page. For instance, the Header or the Footer. The Partial Design contains a collection of components which are the last resort to display the text (or any other functionality). A Partial Design cannot be located directly on a page. It has to be located through a Page Design.
With these concepts in mind, the SXA way to design the look and feel of a page is by defining the header, the footer and other common page areas as Partial Designs, then a Page Design is created for each required page type. There may be more than one Partial Design for a specific page type, supporting more than one layout for a page type such news, although only one Page Design can be applied at a time to a specific page. Sxa allows assigning a default Page Design for each page type.
Let's talk now about data sources and the different locations where they can be stored. A data source is a Sitecore item that contains information (fields with data, images or even other nested items) that can be displayed on any page. There are three kinds of locations where a data source can be stored:
- Local to a Page
- Local to a Partial Design
Let's see each one of them.
Local to a Page
Local data sources are stored in a folder named "Data", nested within the page itself. When a page displays a text from a local data source, such text can be edited by the user while the page is being edited with the Experience Editor. Local data sources can be also displayed through a Partial Desing as the Partial Design can be configured to search in the local data source. When a local data source is displayed through a Partial Desing the user can also edit it through the Experience Editor.
Local to a Partial Design
Partial Designs are very similar to pages while being edited with the Experience Editor. They can also have a nested folder named "Data" for data sources. However, these data sources can be tricky because they allow the user to modify their fields while editing the Partial Design but are not editable (from the Experience Editor) once the Partial Design is displayed on a page and the user is editing such page through the Experience Editor.
Global data sources are also contained in a "Data" folder. Although, in this case, the "Data" folder is a child of the Site item and it is easily available to all pages directly through components located on the page itself or through Partial Designs. When a page displays a text from a global data source through a local component (located directly on the page) the text of the data source can be edited through the Experience Editor. However, if the same text is displayed indirectly through a Partial Design then it is not editable through the Experience Editor.
When a page displays text through a component that is located directly on the page then such page will be searchable by that text, regardless of the text being in a page field, in a local component or in a global component.
However, if the text is displayed through a Partial Desing then the page will be searchable only if the text is stored in a page field. In case the text is located in a data source, regardless of its location, the page won't be searchable.