5

Snippets were introduced in Sitecore SXA 1.6.

What are some differences between snippets and partials designs?

When to use snippets and when to use partial designs with SXA?

6

Partial designs are sets of renderings that are bundled. You can use the partial designs to create design elements of your pages quickly and reuse them easily. They are used a lot for parts like headers and footers.

But:

when you change a partial design, the changes are updated on every page that uses this partial design.

Therefore, you should make sure that you check where it is used before you change it.

Snippets are something different. Got some info here. Those are actually composite renderings. So snippets are also a bundling of renderings. You could reuse the content inside them, but you can also decide to change that on every page. An example usage could be a splitter with some components in them that you want on several pages (with different content).

I would use partials for those parts that do not change in between pages (or at least you have a small number of versions). Like header, footer, ... I would use snippets to make the life of the content editor (more) easy by giving them pre-defined sets of renderings tailored to their needs.

3
  • But from Sitecore documentation, it says differently: You can also change a partial design for a specific page, for example, if you need a slightly different header on a particular page. Partial designs can inherit from each other, so you can build increasingly complex designs from a basic set of reusable partial designs. – Hishaam Namooya Mar 21 '18 at 10:16
  • 1
    I know that is confusing.. but trust me - partial designs are separate items that you refer to. You cannot just change them on a single page. – Gatogordo Mar 21 '18 at 10:33
  • I second that with @gatogordo the partial designs are not meant to be edit on page level once included – Sitecore Sam Mar 21 '18 at 14:15
3

Snippets

The parts which is static one and repeatable on multiple pages, you can create snippets. There are 3 configurations for the snippets. you can also modify the associated content. You can find here:

https://doc.sitecore.net/sitecore_experience_accelerator/working_with_content/sharing_content/select_modify_and_create_associated_content

Partial Designs

Those parts of the website that are constant ones use Partial design for the outer sections. like grey section containers, read section containers and black section containers. Read more at:

https://doc.sitecore.net/sitecore_experience_accelerator/designing/page_design/page_designs

0
2

Supplementing Gatogordo's response with this description from Sitecore's documentation:

In the same way as with partial designs, you can group different kinds of renderings and reuse this group in different locations. The difference between a snippet and a partial design is that snippets are extensible, you can change the styling, and you can use them as often on the page as you want.

1

Snippet in SXA means that when you create and use a snippet on pages, it applies the same rendering everywhere.

For example, you create a header snippet and applies it on the main page, all pages which is using the main page, will have the same rendering.

Partial design is similar to snippet but the only difference is that you can update the design for specific pages.

For example, if you need a slightly different header on a particular page. Partial designs can inherit from each other, so you can build increasingly complex designs from a basic set of reusable partial designs.

So, you would use Snippet if you want to the same design to be applicable everywhere and Partial design where design may change on some specific pages.

1
  • 4
    It's actually the other way round.. – Gatogordo Mar 21 '18 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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