Sitecore Layouts

Sitecore Layouts

Web Forms

  • ASP.NET Web pages
  • Files with an ".aspx" extension
  • The main building block for web application development using the .NET Framework
  • Contain static (X)HTML markup, server-side Web Controls, and User Controls
  • Contain all the required static and dynamic content for the Web page
  • Dynamic code that runs on the server can be placed within a <% -- dynamic code -- %> block

Sitecore Layouts

  • Provide the Web Form used by all pages used in the Sitecore web application
  • Define the overall appearance of web pages or response to an HTTP request
  • Contain a definition item in the Content Tree and a file with an .aspx extension
  • The definition item indicates the name and location of the associated .aspx file

Layout Guidelines

  • Generally use one layout per site per device
  • Add at least one Sitecore placeholder so the layout can be reused
  • Use the head section to specify external CSS stylesheets
  • Limit the number of layouts in favor of sublayouts
  • Place components that appear in every single page statically in the markup of the layout

Displaying Layout Items

  • Grid Designer tab displays static references on layout
  • Content tab shows item definition, including the path to the associated .aspx  file