What is Presentation?

Sitecore is built 100% on the .NET framework so anything you can do in .NET you can do in Sitecore. This includes custom .NET security providers or .NET data providers. You can also reuse ASP.NET controls from your existing solution or other code.

Sitecore handles the content, workflow, languages, device views, URL building, personalization, etc. - but you have full control of the presentation layer.

To understand how presentation works, a few definitions will help.

  • Device: A method within Sitecore for categorizing HTTP requests to the site (e.g. a web, print or mobile view) and displaying the correct layout and components for that device.
  • Layout: Defines the overall appearance of a page (written as a .aspx file)
  • Component: A generic term for a display component using either .Net or XSLT to display content.
    • Sublayout: Defines the appearance of an area of a page (written as an .ascx web control)
    • MVC Rendering: We support View and Controller Renderings in MVC solutions.
    • XSLT Renderings: Transforms content to presentation using XSL Templates (.xslt file)
  • Placeholder: A named location on a layout, sublayout, or view rendering. Placeholders are used to associate controls to a given location for a given item. This allows controls to be bound dynamically.

Dynamic Binding of Components

When loading a URL, Sitecore will determine the item associated with that URL, look at the presentation details (layouts and components placed into placeholders) to present the correct content with the presentation applied. The purpose of placeholders is twofold:

  • Minimize code duplication (i.e. you don't need to make a 2 column layout and a 3 column layout - you can just make one layout and drop a 2 or 3 column sublayout into that).
  • Give page authors and editors the flexibility to add or move components between various placeholders. In this case, I used my discretion to use a 2 column sublayout and move the right-hand components (Related Articles, etc.) to the left in order to give me room to show larger images.