sitecorerenderingsitecore8

Sitecore 8.1 Header and Footer Composite Component


In Sitecore I have created base Template & Renderings for "Header, Top Menu, Logo, Search ,Login Button…etc that comes in Header across all Pages of the Site."

Also the same template & Rendering is using in other website so we can't set value in Standard field.

Now the problem is “suppose we have 100 pages in a Site then each page we have to go and add/update rendering & data source.

Is there any way that a “Header rendering” contains child rendering and by placing “Header rendering” render all its child renderings.

Header Composite Component ===>


Solution

  • There is a composite component module on the Sitecore Marketplace :https://marketplace.sitecore.net/Modules/C/Composite_components.aspx?sc_lang=en

    This fill's your requirements exactly.

    It works by creating a "Composite Component" item, then you add your renderings for your header to that component. E.g. Logo, Navigation etc...

    Then in the standard values of your page templates, you add a new Composite Component rendering and set the datasource to the component item you created.

    The module will then inject the renderings from the component item presentation into your current item. So you only have to update a single place to update all pages etc...

    I have this running in a few production sites and it works well. It even supports the Experience Editor.