0

Our requirement for the project, is to use Snippets and somehow have those snippets added on Page Designs. However, it seems that is not possible, since the standard way to do that is to add a Snippet component inside a Partial Design, then assign it to a Page Design. But putting a Snippet components inside a Partial Design would lose its re-usability features. (I'm bit new to SXA but this is my understanding so far).

I tried adding a Snippet component directly to a Page design, but it is not rendered on the Page/Live site. (I know this is wrong but tried anyway.)

Is there a way or a work around, so that add a Snippet component could be added directly and would work as is on a Page Design?

1
  • 1
    Adding rendering to a Partial, not Page will not cause re-usability loss.I think you need to describe your use case so I can better guide you what to do. This is normal that you cannot add things to a Page Design, they only aggregate Partials. Feb 8, 2018 at 8:43

1 Answer 1

2

You cannot add snippets to a Page Design. You can only assign one or more Partial Designs to a Page Design. The use cases for a Partial Design, a Page Design and a Snippet are all very different.

I'm going to make the assumption that your requirement to "use Snippets" really means use them where they make sense. Not use them everywhere, no matter what. :)

Snippets are a wonderful new tool for content authors to add pre-built collections of components. For instance, a 3-column, 1/3-1/3-1/3 Column Spliter, configured properly for responsive breakpoints, with each column containing a Promo component and associated data sources. While this would be possible, if not quite tedious, for a content author to configure each time they need this type of layout and component composition, Snippets make this painfully simple.

Partial Designs, on the other hand, are more appropriately used for things like headers and footers - things that would apply either globally or evenly to categories of page types.

Your Answer

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

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