Layout sections
Important
Classic CMS reached end-of-life in January 2025 and is no longer receiving feature updates or bug fixes. You should [migrate to Spire CMS](../../End user docs/spire-cms/get-started-with-spire-cms/migrate-from-classic-cms-to-spire-cms.mdx).
Layout Sections provide the ability to inject content into areas of the HTML outside of the Layout template. They support DotLiquid, but do not have a model available. The layout sections that are available are
- ~/Views/LayoutSections/HeadStart.liquid - will be injected immediately after the <head> tag in the page
- ~/Views/LayoutSections/HeadEnd.liquid - will be injected immediately before </head> tag in the page
- ~/Views/LayoutSections/BodyStart.liquid - will be injected immediately after <body> tag in the page
- ~/Views/LayoutSections/BodyEnd.liquid - will be injected immediately after </body> tag in the page
A Google Analytics code snippet is an example of when you'd use a Layout Section. The snippet for Google Analytics needs to exist at the top of the <head> tag. However, in this particular example, Google Analytics is already supported by Configured Commerce using the Analytics settings in the Admin Console: Administration > System > Settings > System Settings > Analytics section.