0
votes

I have a requirement from my customer where I need to make the footer of the website dynamic in terms of adding sublayouts in footer placeholders via page editor by the Content Author.

The footer shall consist of: One content slot - to which any sublayout/sublayouts like grid component or rich text can be added.

I want to add a new placeholder 'ContentSlotPH' to my footer which picks up its presentation details and data from a common page at "/sitecore/Content/Common/Footers/FooterContent/" ( where I have added my sublayouts like grid/richtext for the footer); and shall apply to all the pages of the website where the footer is present. I want this change to be visible on the fly so that in future if the presentation details on FooterContent page change, new presentation and data gets applied to the ContentSlotPH of the footer.

Can someone help me in implementing this?

3
It could be achieved, but now out of the box. Why do you want really to do it in this way? Is sounds like "reusable partial views" in Sitecore. Why don't use Sitecore approach: have base template with standard values? Standard values should have setup of presentation that should be reused on all pages of this type(layout and footer in your case). Pages presentation details should contain only controls specific to these pages.Anton
There probably are solutions for this (anything is possible) - even done something similar myself many years ago. But as Anton says, it's not in the box and Sitecore provides better solutions for this now. Is there any reason why the standard values approach would not do?Gatogordo
Standard values are not editable in the Experience Editor, and requires giving Content Editors access to edit the templates and their standard values. You should look at using Placeholder Fallback instead.jammykam

3 Answers

2
votes

This functionality is not available out of the box unfortunately, the only way to achieve it with standard features (as Anton mentions in the comments) is to set them as presentation details on the standard values of a base template.

Unfortunately, this is not user friendly or editable through the Experience Editor (out of the box). It would also mean giving Content Editors write access to the templates and standard values, something that is normally locked down since making a mistake could cause exceptions especially on a production system.

Instead you could look to utilise Sitecore Placeholder Fallback. This will allow you to set up the headers/footers on a top level page and then any children will fallback to use the renderings in the placeholder from a parent item if they have not been set.

0
votes

We have tried to approach this problem by using components that have presentation details on them. We call these Content Blocks, but other accelerators have different names for them with similar functionality. Essentially, this becomes a 'page inside a page'. You add your component to the template and reference a central datasource which has your footer datasource (including presentation details).

This allows for authors to have access to edit the footer by editing the footer component datasource without accessing template details.