5

I notice that with SXA there are two types of partial design:

  • Partial Design /sitecore/templates/Foundation/Experience Accelerator/Presentation/Partial Design
  • Metadata Partial Design /sitecore/templates/Foundation/Experience Accelerator/Presentation/Metadata Partial Design

Are these treated differently by Sitecore/SXA, or do they just serve the purpose of making a distinction between standard content and metadata?

It may be related, but I found that the cache settings (under /sitecore/content/MyWebsite/Commerce Websites/Shared Website/Presentation/Cache Settings seem not to work for certain renderings in a metadata partial design. I can only get these to cache by applying cache settings to the rendering definition items directly.

2 Answers 2

2

The main difference is how the components are rendered in the experience editor when editing the partial.

When editing a Meta Partial Design, it uses a special Metadata Snipped Layout.cshtml. This enabled 3 placeholders that are not available during normal page or standard partial design editing. They are:

  • head
  • body-top
  • body-bottom

It also renders out raw markup to the page to enable you to see what is contained in those sections. When these are rendered out to the page, normally they contain invisible DOM elements or links or meta tags etc...

Meta Partial Design Uses

The Meta Partial design should be used for meta data content. So this is where the Browser Title and Meta Content components are added. You might use a Meta Html Snippet component in there to add things like Google Tag Manager code or other tracking code etc...

enter image description here

Standard Partial Design

A standard Partial Design gives you access to the standard placeholders for an SXA Layout:

  • header
  • main
  • footer

And you can use these to create visible components for each page.

0

The main difference between the Partial Design and the Metadata Partial Design is the Layout they use.

Partial Design

Uses Layouts/Foundation/Experience Accelerator/MVC/MVC Layout. This layout is bound to /Views/SxaLayout/SxaLayout.cshtml and contains the following placeholders:

  • head
  • body-top
  • header
  • main
  • footer
  • body-bottom

Metadata Partial Design Uses Layouts/Foundation/Experience Accelerator/Presentation/Metadata Layout. This layout is bound to /Views/SXA/Metadata Snippet Layout.cshtml and contains the following placeholders:

  • head
  • body-top
  • body-bottom

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.