While binding the Content with its presentation, we have two terminologies, Static Binding and Dynamic Binding. Know more..
In this post, we’ll see how Sitecore adds one more level of abstraction over binding Content with its Presentation Components, empowering both – the Developer as well as the Page Editor user – and moving to a simple and very effective solution. I have added this to my list of reasons for Why I Love Sitecore. For anything that we do, we have 3 questions in our What, Why & How? So lets start getting answers for these questions.
What are Sitecore Placeholder Settings?
A Placeholder setting is linked to a Placeholder key and adds a level of abstraction while binding a presentation component with the corresponding content. In a Placeholder Settings item, we give it a name so that it can be easily identified — for which specific location would it be made — and specify a number of sublayouts and/or renderings in it, which are appropriate according to the design changes of the current website. They are of two types:
- Global Placeholder settings
- Placeholder Key is specified in the Settings item.
- Does not need to be attached to Presentation details of various Template’s Standard Values or that of items.
- Sitecore by default identifies if the placeholder key mentioned here is present on the page, and allows us to add the controls allowed here to be added to the page.
- Data Template-specific Placeholder settings
- Placeholder Key is Template specific.
- Placeholder Key needs to be specified while adding it to the Presentation Details of Template’s Standard values or that of item.
Why Sitecore Placeholder Settings?
- It empowers the Page Editor users, to make the necessary design changes at required locations, without being dependent on the Developer.
- It relieves the Developer from the hassle of going back to the client site, just to make simple design level changes.
- The components that can be added at any location in a website, are specified in the allowed controls of it. So the Page Editors can select the ones out of them. This not only helps them in selection for which component they want, but also makes sure that an inappropriate component is not added to a location where it should not be. (Lets say, in case of a blog, we have a left sidebar, with components of Recent Posts & Recent Comments. We can have a Placeholder setting, for left sidebar with other allowable components along with the above, say Blog Roll, Blog Archives and link it with the data template to avoid a component of main blog post to be added to the left sidebar)
- Ideally, Placeholder settings should be configured before various presentation components are bound to its corresponding content. But in case that’s not done, they can be easily plugged-in whenever we want to, with a little effort, by understanding the broad-level architecture of the site.
In part 2 of this post, lets see how to configure Placeholder Settings.
Happy Sitecoring! 🙂