3

What are composite components or renderings in SXA? (I'm looking for answers describing the inner workings, ideally).

I have read about SXA composite components and SXA composite renderings. From what I can tell, this is not SXA-specific, but rather a type of rendering which uses a datasource containing multiple sub-items. Am I missing something here? From what I can see, they seem to be quite similar to Partial Designs (in having their own layout) but do not have a way to edit them in Sitecore.

Edit: On further examination, I see that the composite components have their own layouts, so probably are specific to SXA.

2
  • 3
    You might want to review chrisvandesteeg.nl/2015/11/03/sitecore-composite-components. I’ve used these on non-SXA projects successfully. They work very well. Verified on 8.2u5.
    – jrap
    Commented Feb 25, 2018 at 2:57
  • 1
    I have also used the composite components that @jrap mentions. Although it is worth noting that this is a very different thing to the composites in SXA. The one from Chris Van De Steeg have more in common with a Partial Design in SXA.
    – Richard Seal
    Commented Feb 25, 2018 at 6:30

2 Answers 2

5

In SXA, composite components are ones that get layered together. Think of the Tabs or Accordion components. Each of these require you to add a primary component, then add secondary components. The experience may have improved between versions, but here is an example in SXA 1.6.

Examples: Tabs component.

enter image description here

enter image description here

Take notice how the Tab component contains Tab Item 1 and Tab Item 2. Then nested in each is some text and an image.

enter image description here

Behind the scenes the data is stored like this:

enter image description here

Note: Snippet is the new kid on the block (1.6) to build your own composite components

3

From the Sitecore Documentation on Composite Renderings:

A composite rendering consists of several renderings. Each instance can have its own layout and it can be designed separately in Experience Editor. When a composite rendering is rendered on the page, it queries each item from its data source and pulls data and layout. This facilitates building very complex layouts, but also involves a more advanced setup.

This is a concept that has been around in various forms for a while. I think Thomas Eldblom came up with the first version of it almost 10 years ago. SXA has refined the implementation and made it much more user-friendly.

2
  • 1
    I've read that very same article as well (I linked to it in the question!). I was hoping for an answer which would shine some light on how these are developed and their inner workings. Commented Feb 25, 2018 at 14:00
  • So you did. I only saw the first link. I guess I should read more carefully. Perhaps it would also be a good idea to specify that you are looking for implementation details in your question.
    – Ben Golden
    Commented Feb 25, 2018 at 17:57

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.