Skip to main content
added 667 characters in body
Source Link
Matthew Dresser
  • 6.1k
  • 2
  • 29
  • 77

Layouts

  • Provide the outermost HTML structure of a page.
  • There is one layout (per device) per page.
  • Apply to WebForms (.aspx) and MVC (.cshtml)
  • Comprise of Layout definition item and aspx page (WebForms) or cshtml file (MVC)

Sublayouts

  • Provide inner HTML structure to a component or structuring element of a page.
  • Apply only to WebForms
  • Comprise of a definition item + .ascx control.
  • Can contain nested Sublayouts within their placeholders

Renderings

  • Provide inner HTML structure to a component or structuring element of a page.
  • Can be used with WebForms OR MVC (if using XSLT) OR MVC
  • Sitecore MVC uses the following rendering sub-types:
  • Controller rendering: rendering definition item references a controller and action name
  • View rendering: rendering definition item references a view (cshtml file) and optionally a viewmodel (which in turn references a model type in code)
  • Item rendering: rendering definition item does not reference a controller or a view, instead it serves as a kind of 'placeholder'. The datasource item should have a rendering type associated with it via the __renderers field. Setting the datasource of an item rendering causes Sitecore to look at the datasource item itself to decide which rendering to use.
  • Comprise of a definition item + .xslt or .cshtml view
  • Can contain nested renderings (or sublayouts [1]) within their placeholders

[1] can only contain nested sublayout if xslt rendering within a WebForms solution

More information on MVC-specific aspects can be found here: http://www.matthewdresser.com/sitecore/sitecore-mvc-presentation-concepts

Layouts

  • Provide the outermost HTML structure of a page.
  • There is one layout (per device) per page.
  • Apply to WebForms (.aspx) and MVC (.cshtml)
  • Comprise of Layout definition item and aspx page (WebForms) or cshtml file (MVC)

Sublayouts

  • Provide inner HTML structure to a component or structuring element of a page.
  • Apply only to WebForms
  • Comprise of a definition item + .ascx control.
  • Can contain nested Sublayouts within their placeholders

Renderings

  • Provide inner HTML structure to a component or structuring element of a page.
  • Can be used with WebForms OR MVC (if using XSLT)
  • Comprise of a definition item + .xslt or .cshtml view
  • Can contain nested renderings (or sublayouts [1]) within their placeholders

[1] can only contain nested sublayout if xslt rendering within a WebForms solution

Layouts

  • Provide the outermost HTML structure of a page.
  • There is one layout (per device) per page.
  • Apply to WebForms (.aspx) and MVC (.cshtml)
  • Comprise of Layout definition item and aspx page (WebForms) or cshtml file (MVC)

Sublayouts

  • Provide inner HTML structure to a component or structuring element of a page.
  • Apply only to WebForms
  • Comprise of a definition item + .ascx control.
  • Can contain nested Sublayouts within their placeholders

Renderings

  • Provide inner HTML structure to a component or structuring element of a page.
  • Can be used with WebForms (if using XSLT) OR MVC
  • Sitecore MVC uses the following rendering sub-types:
  • Controller rendering: rendering definition item references a controller and action name
  • View rendering: rendering definition item references a view (cshtml file) and optionally a viewmodel (which in turn references a model type in code)
  • Item rendering: rendering definition item does not reference a controller or a view, instead it serves as a kind of 'placeholder'. The datasource item should have a rendering type associated with it via the __renderers field. Setting the datasource of an item rendering causes Sitecore to look at the datasource item itself to decide which rendering to use.
  • Comprise of a definition item + .xslt or .cshtml view
  • Can contain nested renderings (or sublayouts [1]) within their placeholders

[1] can only contain nested sublayout if xslt rendering within a WebForms solution

More information on MVC-specific aspects can be found here: http://www.matthewdresser.com/sitecore/sitecore-mvc-presentation-concepts

Source Link
Matthew Dresser
  • 6.1k
  • 2
  • 29
  • 77

Layouts

  • Provide the outermost HTML structure of a page.
  • There is one layout (per device) per page.
  • Apply to WebForms (.aspx) and MVC (.cshtml)
  • Comprise of Layout definition item and aspx page (WebForms) or cshtml file (MVC)

Sublayouts

  • Provide inner HTML structure to a component or structuring element of a page.
  • Apply only to WebForms
  • Comprise of a definition item + .ascx control.
  • Can contain nested Sublayouts within their placeholders

Renderings

  • Provide inner HTML structure to a component or structuring element of a page.
  • Can be used with WebForms OR MVC (if using XSLT)
  • Comprise of a definition item + .xslt or .cshtml view
  • Can contain nested renderings (or sublayouts [1]) within their placeholders

[1] can only contain nested sublayout if xslt rendering within a WebForms solution