PrintNowPrintNowDocs
Themes

Master Pages

Understand the ASP.NET master page hierarchy that defines Print Store page layouts.

Master pages are ASP.NET files (.master) that define the structural layout of storefront pages. Each master page contains HTML markup, server controls, and content placeholders that child pages fill with their specific content. Master pages form an inheritance hierarchy — specialized pages like product details extend base layouts like the sidebar display.

Master Page Hierarchy

The following diagram shows how master pages inherit from each other:

PrintnowDisplay.master (root)
├── PrintnowDisplaySingle.master    (full-width, no sidebar)
├── PrintnowHomeDisplay.master      (home page with sidebar)
└── PrintnowSidebarDisplay.master   (non-home pages with sidebar)
    ├── CategoryOverview.master     (main category page)
    ├── SubCategoryOverview.master  (sub-category / product listing)
    ├── ProductDetails.master       (individual product page)
    └── Blog masters...

Master Page Reference

Master PageInherits FromPurpose
PrintnowDisplay.masterRoot layout defining the page shell: <html>, <head>, <body>, <form>, and all required server controls. Contains header, navigation, sidebar, main content area, and footer.
PrintnowDisplaySingle.masterPrintnowDisplayFull-width layout with no sidebar. Wraps cpMainContent in a col-md-12 container. Sidebar placeholder exists but is hidden.
PrintnowHomeDisplay.masterPrintnowDisplayHome page layout with sidebar. Used when the storefront's default (home) page needs a sidebar alongside the main content.
PrintnowSidebarDisplay.masterPrintnowDisplayStandard layout for non-home pages with a sidebar. Most category and product pages inherit from this.
CategoryOverview.masterPrintnowSidebarDisplayDisplays a main product category with its sub-categories. Has access to Category data object with sub-categories, thumbnails, and start prices.
CategoryOverview2.masterPrintnowSidebarDisplayAlternate category layout. Use when you need a different visual treatment for certain categories.
SubCategoryOverview.masterPrintnowSidebarDisplayDisplays a sub-category with product listing, calculator, and product browser. Supports category data, thumbnails, extended content, and the calculator component.
SubCategoryOverview2.masterPrintnowSidebarDisplayAlternate sub-category layout.
ProductDetails.masterPrintnowSidebarDisplayIndividual product page with thumbnails, description, calculator, pricing table, tabs, tags, and related products.
ProductDetails2.masterPrintnowSidebarDisplayAlternate product detail layout.
LandingPageView.aspxPrintnowDisplayDisplays a landing page with CMS content and child item cards (categories, sub-pages, groups). Supports a custom Mustache template (landing-page.mustache) in the theme's page-templates/ folder.
BlogHome.masterPrintnowDisplayBlog home page displaying blog posts.
BlogPost.masterPrintnowDisplayIndividual blog post page.
BlogCategory.masterPrintnowDisplayBlog category listing page.

Master Page Directive Attributes

Master pages declare special attributes in their @Master directive that control data loading and component behavior:

<%@ Master Language="VB" MasterPageFile="~/PrintnowSidebarDisplay.master"
    AutoEventWireup="false"
    CodeBehind="CategoryOverview.master.vb"
    Inherits="Printnow.CategoryLayout"
    ThumbSize="500"
    EnableCategoryData="True" %>
AttributeValuesDescription
MasterPageFilePath to parent masterSpecifies which master page this page inherits from (e.g., ~/PrintnowSidebarDisplay.master).
EnableCategoryDataTrue / FalseWhen True, populates the Category data object with sub-categories, thumbnails, tags, tabs, and extended content. Used on CategoryOverview and SubCategoryOverview.
ThumbSizeInteger (pixels)Sets the maximum dimension for thumbnails loaded into the Thumbnails collections. Default varies by master page.
CalculatorTemplateTemplate name (e.g., "default")Specifies which calculator template to load from the calculator/ folder. Maps to calculator/{name}.html.

Content Placeholders

Master pages define ContentPlaceHolder controls that child pages and the PrintNow engine fill with content. Here are the standard placeholders:

PlaceholderLocationDescription
cpHead<head>Additional styles, scripts, and meta tags injected into the page head. Should be the last tag in <head>.
cpMainBody<body>The primary content area. On PrintnowDisplay.master, this is where all page content renders.
cpTitleBar<body>Page title bar area. Rarely used directly but available for custom title sections.
cpMainContentSidebar layoutsThe main content column in sidebar layouts (used by PrintnowSidebarDisplay and its children).
cpSideBarSidebar layoutsThe sidebar column content. Can be made visible or hidden per master page.
cpBannerContentPrintnowDisplaySingleBanner area above main content in the single-column layout.

Category and Product Placeholders

CategoryOverview, SubCategoryOverview, and ProductDetails master pages expose additional placeholders for their specific content sections:

PlaceholderMaster Page(s)Description
CmsContentCategory, SubCategoryCMS-managed content for the category.
SubCategoryListCategoryOverviewAuto-generated list of sub-categories.
SubCategoryLinksCategoryOverviewAuto-generated sub-category navigation links.
CmsTabContentCategoryOverviewTabbed CMS content sections.
GetStartedButtonsCategoryOverviewAction buttons for the category (e.g., "Get Started").
CalculatorCategoryOverview, SubCategoryThe pricing calculator component.
CarouselProductDetailsProduct image carousel.
ProductNameProductDetailsAuto-generated product name heading.
UnitPriceLineProductDetailsStarting price display.
ProductCmsContentProductDetailsProduct-level CMS content.
PricingContentProductDetailsPricing-specific CMS content.
PageCmsContentProductDetailsPage-level CMS content.
MiniCalculatorProductDetailsCompact calculator display.
ProductTagsProductDetailsAuto-generated product tag links.
RelatedProductsProductDetailsAuto-generated related products section.

Hiding Default Placeholders

When you build a custom layout using data properties (e.g., looping through Category.SubCategories yourself), you can hide the auto-generated placeholders by setting Visible="False":

<%-- Hide auto-generated content, use custom layout instead --%>
<asp:ContentPlaceHolder ID="SubCategoryList" runat="server" Visible="False" />
<asp:ContentPlaceHolder ID="CmsTabContent" runat="server" Visible="False" />

This is a common pattern — hide the default rendering and replace it with your own markup using the data properties and object models.

Data Properties by Master Page

Different master pages expose different data objects for use in your templates:

Master PageAvailable Data
PrintnowDisplay.masterCategoryMenuEntry, Categories, Products
PrintnowHomeDisplay.masterCategories, Products
ProductDetails.masterCategory, Product, Categories, Products
CategoryOverview.masterCategory, Categories
SubCategoryOverview.masterCategory, Categories, Product Browser

See Data Properties for the full property and function reference.

On this page