Thursday, March 16, 2017

SXA Presentation Tips

Being very new to SXA (aren't we all) I needed to get rapidly up to speed with this new way of doing Sitecore, I found this handy snippet on http://sitecore.stackexchange.com/questions/1995/sxa-page-design-vs-page-standard-values-vs-page-branch-template
I thought it worth sharing and credit for this should go to : Alan Płócieniak

With Sitecore Experience Accelerator you can forget about previous methods, however, there is nothing that will block you from using them.
Before - NO SXA:
  • you had to decide how your page will look like before you entered content (because the presentation was stored either on SV or somewhere inside different branches)
  • you couldn't easily switch your presentation once you created your item with predefined presentation details. Option for doing that could be changing the template to use a different one with different presentation or manipulate presentation manually. Not so comfortable if we are talking about thousands of pages.
Now - SXA:
With SXA you can use the same approach, however, what makes it special is the fact that you can treat your items like a data storage and define presentation somewhere else.
Why is it cool?
Because when you've got your data and presentation decoupled you can easily change presentation details any time you want (there is so called design to template mapping).
enter image description here
Notice that all you need to do is to change the value of a single drop down to change the Design of all pages under your site.
Of course, you are not forced to define presentation details in one place and data in another. Page designs are sort of set of renderings injected onto your page but are not there in reality. You are able to add your additional renderings even that and page will render merged content at the end.
Here are key points:
Advantages:
  • flexibility - you can easily switch presentation details without touching templates
  • maintainability - you can build partial designs like normal pages (open Experience Editor and drop renderings), you couldn't manipulate presentation details using previous approaches
  • hierarchy - data templates definition are stored under templates, where designers (presentation designers) should no go to, that's why presentation can be created on so-called Partial Designs, I think it is pretty important to keep things secure.
  • re-usability - as you probably know page designs are build from partial designs. In this case, you can reuse existing presentation parts. Let's say you define single header partial design and then use it on different designs where content part or footer is different.