Text page template
Published shop text content.
Output: page body inside the storefront layout.
Shared structures available in recorded contexts: shop, branding, theme, urls, page, navigation, breadcrumbs, languageSwitcher, currencySwitcher, headerActionContributions, labels, security, footer, cartPreview, accountHeader.
| Field | Type | Meaning | Availability |
|---|---|---|---|
viewModel.search |
object | Search data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.search.isEnabled |
boolean | Whether enabled applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.textPage |
object | Text page data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.textPage.bodyHtml |
string | Prepared HTML; preserve the supplied markup. | When the parent is provided; check optional fields. |
viewModel.textPage.configuredLanguageCount |
number | Configured language count numeric value. | When the parent is provided; check optional fields. |
viewModel.textPage.createdAt |
string | created timestamp; may be empty. | When the parent is provided; check optional fields. |
viewModel.textPage.isActive |
boolean | Whether active applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.textPage.pageId |
number | page identifier; do not load data with it. | When the parent is provided; check optional fields. |
viewModel.textPage.pageKey |
string | Page key value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.textPage.shopId |
number | shop identifier; do not load data with it. | When the parent is provided; check optional fields. |
viewModel.textPage.title |
string | Title value supplied for this context. | When the parent is provided; check optional fields. |
viewModel.textPage.updatedAt |
string | updated timestamp; may be empty. | When the parent is provided; check optional fields. |
viewModel.textPage.url |
string | Prepared url URL; use unchanged. | When the parent is provided; check optional fields. |
viewModel.wishlist |
object | Wishlist data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.wishlist.isEmpty |
boolean | Whether empty applies; use for display only. | When the parent is provided; check optional fields. |
viewModel.wishlist.itemCount |
number | Item count numeric value. | When the parent is provided; check optional fields. |
viewModel.wishlist.items |
array | Prepared items collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.wishlist.productIdMap |
object | Product id map data; check child fields before use. | When the parent is provided; check optional fields. |
viewModel.wishlist.productIds |
array | Prepared product ids collection; may be empty. | When the parent is provided; check optional fields. |
viewModel.wishlist.wishlistId |
number | wishlist identifier; do not load data with it. | When the parent is provided; check optional fields. |
viewModel.wishlist.wishlistKey |
string | Wishlist key value supplied for this context. | When the parent is provided; check optional fields. |
Assets
Section titled “Assets”The reference package uses its bundled theme CSS, Bootstrap and theme JavaScript. Account and checkout controls use the bundled checkout script. Partials use their caller’s resolved assets.
Example
Section titled “Example”<cfset viewModel = routeConfig.viewModel><cfoutput><h1>#encodeForHtml(viewModel.page.title)#</h1></cfoutput>Use the page-specific structures above for the remaining content.
Behaviour
Section titled “Behaviour”Use prepared URLs and labels. Encode plain text and HTML attributes; preserve only explicitly prepared HTML.