Renuka
Renuka

Reputation: 39

Copy presentation details and data from a page to a placeholder of another page on the fly in sitecore 8.1

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?

Upvotes: 0

Views: 308

Answers (3)

Jay S
Jay S

Reputation: 7994

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.

Upvotes: 0

jammykam
jammykam

Reputation: 16990

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.

Upvotes: 2

Related Questions