MainContentTop page section by the Advanced Page Content rendering. It appears above the main component placeholder flow.Advanced Page Content
The Advanced Page Content rendering injects raw HTML into named page-level sections of the layout. Unlike typical renderings that output content within their placeholder, this component writes to framework-level slots such as HeadTop, HeadMeta, BodyTop, BodyBottom, OffCanvasLeft, OffCanvasRight, MainContentTop, and MainContentBottom.
Each field in the datasource corresponds to a named section. The view iterates every property on the model (excluding Hint* prefixed fields), renders the field value via Html.Section(), and uses the companion Hint* field as a deduplication key. An AdditionalSections name-value list field allows arbitrary extra sections to be defined without template changes.
This rendering is commonly used for page-specific scripts, meta tags, structured data, off-canvas markup, or main-content wrappers that must appear outside the normal component placeholder flow.
Examples
Example Description
Below is a live Advanced Page Content rendering. The datasource populates the MainContentTop and MainContentBottom fields with alert banners, and the BodyBottom field with an HTML comment (inspect the page source near </body> to see it). Because the rendering injects content into page-level sections rather than inline, the alerts appear at the top and bottom of the <main> element — not within this Examples grid.
The HintMainContentTop and HintMainContentBottom fields are set to unique strings (apc-example-top, apc-example-bottom) to prevent duplicate injection if the same datasource were referenced by multiple renderings on a page.
Usage Notes
Usage Notes
- The rendering iterates all model properties except those prefixed with
Hint. Each property’s value is rendered viaHtml.Section(name, hint, content), injecting the HTML into the corresponding named section of the layout. - The companion
Hint*fields (e.g.,HintMainContentTop) supply a deduplication key. If two renderings on the same page write the same section with the same hint, the content is output only once. Leave the hint empty to always render (unique GUID is generated). - The
Dropfield is always rendered inline at the rendering’s placeholder position (via<sc-text asp-for="Drop">). Use it for content that should appear exactly where the rendering is placed — typically a visual placeholder in Experience Editor. - The
AdditionalSectionsfield is a Name Value List (stored as URL-encodedkey=value&key2=value2). Each entry is decoded and output as its own section, allowing ad-hoc section injection without template changes. - This rendering does not have its own rendering parameters template. When placed in a placeholder, it inherits standard Column parameters (Small, Medium, Large, Offsets, Padding, AddClass) from the placeholder’s allowed renderings configuration.
- Common use cases include: page-specific
<script>or<link>tags inHeadTop/HeadMeta, structured data (ld+json) inHeadMeta, analytics or consent tags inBodyBottom, off-canvas drawer markup inOffCanvasLeft/OffCanvasRight, and hero or breadcrumb wrappers inMainContentTop. - If
Model.IsEditingistrue(Experience Editor), the section-injection logic is skipped entirely and only theDropfield and<edit-label>are rendered, ensuring safe editing without injecting partial markup into the page head.
Control Properties
Control Properties
Standard Values / Defaults
The __Standard Values item for the Advanced Page Content datasource template ({86FFBOOD-17F0-4B0E-9D64-6D3369A93BDC}) defines:
| Property | Default Value | Notes |
|---|---|---|
| __Default workflow | {88A944A1-60B2-4E5B-BDF2-BD859C9C0169} | Markel Standard Workflow assigned automatically on item creation. |
| __Enable item fallback | 1 (checked) | Language fallback is enabled by default. |
| Drop | (empty) | No inline content by default. |
| HeadTop | (empty) | No head-top injection by default. |
| HeadMeta | (empty) | No meta injection by default. |
| BodyAttributes | (empty) | No body attributes by default. |
| BodyTop | (empty) | No body-top injection by default. |
| BodyBottom | (empty) | No body-bottom injection by default. |
| OffCanvasLeft | (empty) | No off-canvas left content by default. |
| OffCanvasRight | (empty) | No off-canvas right content by default. |
| MainContentTop | (empty) | No main-content-top injection by default. |
| MainContentBottom | (empty) | No main-content-bottom injection by default. |
| AdditionalSections | (empty) | No additional sections by default. |
| All Hint* fields | (empty) | Empty hints cause a unique GUID to be generated at render time (no deduplication). |
Datasource Fields
| Field | Type | Section | Description |
|---|---|---|---|
| Drop | Rich Text | Main Content | Inline content rendered at the rendering’s placeholder position. Visible in Experience Editor. |
| HeadTop | Rich Text | Head | HTML injected at the very top of the <head> element (before meta charset). |
| HeadMeta | Rich Text | Head | HTML injected into the <head> for meta tags, structured data, or stylesheets. |
| BodyAttributes | Single-Line Text | Body | Attributes appended to the <body> tag (e.g., data-page="landing"). |
| BodyTop | Rich Text | Body | HTML injected immediately after the opening <body> tag. |
| BodyBottom | Rich Text | Body | HTML injected immediately before the closing </body> tag (scripts, noscript, etc.). |
| OffCanvasLeft | Rich Text | Canvas | Markup for a left off-canvas panel. |
| OffCanvasRight | Rich Text | Canvas | Markup for a right off-canvas panel. |
| MainContentTop | Rich Text | Main | HTML rendered above the main component placeholder area. |
| MainContentBottom | Rich Text | Main | HTML rendered below the main component placeholder area. |
| AdditionalSections | Name Value List | AdvancedEntry | URL-encoded key=value pairs; each key becomes a section name and the decoded value is injected. |
| HintHeadTop | Single-Line Text | Hints | Deduplication key for HeadTop. |
| HintHeadMeta | Single-Line Text | Hints | Deduplication key for HeadMeta. |
| HintBodyTop | Single-Line Text | Hints | Deduplication key for BodyTop. |
| HintBodyBottom | Single-Line Text | Hints | Deduplication key for BodyBottom. |
| HintBodyAttributes | Single-Line Text | Hints | Deduplication key for BodyAttributes. |
| HintOffCanvasLeft | Single-Line Text | Hints | Deduplication key for OffCanvasLeft. |
| HintOffCanvasRight | Single-Line Text | Hints | Deduplication key for OffCanvasRight. |
| HintMainContentTop | Single-Line Text | Hints | Deduplication key for MainContentTop. |
| HintMainContentBottom | Single-Line Text | Hints | Deduplication key for MainContentBottom. |
Rendering Parameters (Column — inherited from placement)
The Advanced Page Content rendering does not define its own parameters template. When placed in a placeholder, it inherits standard Column parameters:
| Property | Type | Description |
|---|---|---|
| Small | Column Width (Droplink) | Bootstrap column class at the small breakpoint. |
| Medium | Column Width (Droplink) | Bootstrap column class at the medium breakpoint. |
| Large | Column Width (Droplink) | Bootstrap column class at the large breakpoint. |
| OffsetSmall / OffsetMedium / OffsetLarge | Column Offset (Droplink) | Column offset at each breakpoint. |
| PaddingTop / PaddingBottom / PaddingStart / PaddingEnd | Dictionary Phrase (Droplink) | Padding classes applied to the rendering wrapper. |
| AddClass | Single-Line Text | Additional CSS classes on the rendering wrapper. |
Template properties
Control properties
MainContentBottom page section. It appears below the main component placeholder flow.