Loading...
Area: Episerver B2B Commerce

Layout sections in Classic

Recommended reading 

Overview

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 Epi B2B Commerce using the Analytics settings in the Admin Console: AdministrationSystem  > Settings System SettingsAnalytics section.

Do you find this information helpful? Please log in to provide feedback.

Last updated: Dec 11, 2020

Recommended reading