6

When I build my page in SXA I use components like Rich Text to implement page elements. Content I entered is stored in component data-source on page level. This is exactly what typical content author need.

If several of my pages share common design, SXA recommends to use Partial Designs. I tried to use it and discovered that components moved to Partial Design are not editable on page level anymore and cannot have page specific content.

I guess that is fine for *Reusable components, but for regular components it looks strange.

How can I use Partial Designs and have page specific Rich Text content in that design?

2 Answers 2

6

If you want to skip adding rendering to an empty Container each time you add a new page try this trick.

  • Put Rich Text on your Partial design

  • Now open its rendering parameters and see what is in Data Source field. There should be something like this: local:/Data/Text

  • Now let's change it to: page:/Data/Text

From now when you open your page where you currently using this design you will notice that you can edit this Rich Text.

enter image description here

Make sure that you have recreated proper Data folder structure with Text item under your page

enter image description here

From now you can edit Rich Text which is located on a Partial design (in a single place) but at the same time, you are able to edit content separately for different pages as data source is stored under Page Data.

Of course, this solution is not perfect because you have to add datasource items manually.

This can be solved!

Create a Branch with your Page and create predefined Page Data folder structure with all needed datasources for renderings which are defined on a partial design, then add it as an Insert Option.

The advantage of this solution is fact that this rendering is available for editing but could not be removed from the page.

4

Yes, page specific content is supported with Partial Designs. You will want to add a component to the Partial Design called a Container. This will allow you to drop whatever reusable or non-reusable component to the page.

Once you add a non-reusable component you'll see the Data element be created as a child of the page instance.

2
  • Is the Container the magic piece that makes this work?
    – jdylanmc
    Commented Nov 9, 2016 at 15:26
  • Pretty much. You will notice that the only time you can add any component to a page instance or partial design is when the checkered box is visible. The container ensures that the checkered box is available for page instances. Commented Nov 9, 2016 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.