PrintNowPrintNowDocs
Themes

Skeleton Reference

Annotated skeleton PrintnowDisplay.master file — the minimum code required for a Print Store theme.

The skeleton file below is a stripped-down version of PrintnowDisplay.master for use in theme development. It includes the minimum code required to convert a standard HTML Bootstrap theme into a Print Store theme. While there are other master pages in the theme structure, this is the core file you work with to complete a standard integration.

Skeleton PrintnowDisplay.master

<%@ Master Language="VB" AutoEventWireup="false"
    CodeBehind="PrintnowDisplay.Master.vb"
    Inherits="Printnow.PrintnowDisplay" %>
<!DOCTYPE html>
<html>
<head runat="server">
    <%-- Required default styles and scripts --%>
    <link rel="stylesheet" href="/{pn_theme_path}/css/bootstrap.css">
    <link href="/{pn_theme_path}/css/pn-bootstrap.css" rel="stylesheet">
    <script src="/{pn_theme_path}/js/jquery.js"></script>

    <%-- cpHead content placeholder must be the last tag in head --%>
    <asp:ContentPlaceHolder ID="cpHead" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
        <%-- RadSkinManager and ScriptManager are invisible (required) --%>
        <telerik:radskinmanager id="RadSkinman" runat="server"
            skin="Default" />
        <asp:ScriptManager ID="ScriptManager1" runat="server" />

        <%-- Logout warning control, hidden with jQuery --%>
        <printnow:warnBeforeLogout runat="server" />

        <%-- Search text input and button --%>
        <asp:TextBox ID="search" runat="server"
            CssClass="form-control search"></asp:TextBox>
        <pn:ButtonEx ID="searchButton" runat="server"
            Text="<i class='icon icon-search'></i>"
            CssClass="btn btn-default"
            CausesValidation="false" />

        <%-- Welcome message for logged-in users --%>
        <pn:WelcomeUser runat="server"
            MessageFormat="Welcome, {name}" />

        <%-- Login/logout button --%>
        <printnow:AccountHeaderPane runat="server" />

        <%-- Shopping cart item count --%>
        <pn:CartCount runat="server" EmptyWhenZero="True" />

        <%-- Built-in breadcrumb navigation --%>
        <pn:Breadcrumb ID="breadcrumb1" runat="server" />

        <%-- Page title bar (not commonly used) --%>
        <asp:ContentPlaceHolder ID="cpTitleBar" runat="server" />

        <%-- Main body content area --%>
        <asp:ContentPlaceHolder ID="cpMainBody" runat="server" />

        <%-- Required script just before closing form tag --%>
        <script src="/{pn_theme_path}/js/bootstrap.js"></script>
    </form>
</body>
</html>

Line-by-Line Annotations

Master Page Directive

<%@ Master Language="VB" AutoEventWireup="false"
    CodeBehind="PrintnowDisplay.Master.vb"
    Inherits="Printnow.PrintnowDisplay" %>

Declares this as an ASP.NET master page. Inherits="Printnow.PrintnowDisplay" connects the page to PrintNow's code-behind class, which provides all the server-side properties and controls.

Head Section

ElementRequiredNotes
<head runat="server">YesThe runat="server" attribute is required for ASP.NET to inject its own head content.
Bootstrap CSSRecommendedInclude your Bootstrap CSS and any theme stylesheets. Use {pn_theme_path} for the path.
jQueryYesRequired for PrintNow's client-side functionality.
cpHead placeholderYesMust be the last element in <head>. Child pages and PrintNow inject additional styles and scripts here.

Body — Required Invisible Controls

ControlRequiredNotes
<form id="form1" runat="server">YesASP.NET requires exactly one server-side form. All content must be inside this form. Do not add additional <form> tags.
RadSkinManagerYesInvisible. Manages Telerik control skins.
ScriptManagerYesInvisible. Required ASP.NET AJAX infrastructure.
warnBeforeLogoutYesSession timeout warning. Hidden by jQuery until triggered.

Body — User-Facing Controls

ControlRequiredNotes
Search (TextBox + ButtonEx)OptionalPlace in your header where the search bar belongs. The CssClass="search" is used by JS to identify the search field.
WelcomeUserOptionalPlace where you want the greeting. Hidden when no user is logged in.
AccountHeaderPaneRecommendedAuto-renders login/logout links. Place in your header navigation.
CartCountOptionalPlace near your cart icon. With EmptyWhenZero, it renders nothing when cart is empty.
BreadcrumbOptionalPlace below the header. Auto-generates breadcrumb trail based on navigation.

Body — Content Placeholders

PlaceholderRequiredNotes
cpTitleBarOptionalTitle bar area. Rarely used directly.
cpMainBodyYesThis is where all page content renders — CMS pages, product pages, checkout, etc. Place it in your main content area.

Body — Closing Scripts

<script src="/{pn_theme_path}/js/bootstrap.js"></script>

Place Bootstrap's JavaScript (and any other scripts) just before the closing </form> tag. This ensures all DOM elements are loaded before scripts execute.

Conditional Logic

You can add conditional sections using VB.NET inline expressions:

<% If IsHomePage Then %>
    <%-- Show hero banner only on home page --%>
    <div class="hero">...</div>
<% End If %>

<% If IsLoggedIn Then %>
    <span>Hi, <%= CustomerFirstName %></span>
<% Else %>
    <a href="/login.aspx">Sign In</a>
<% End If %>

See Data Properties for all available properties and functions.

Next Steps

After setting up your PrintnowDisplay.master, proceed to customize:

  1. Category Overview — Category landing pages
  2. Product Details — Product pages
  3. Page Templates — Cart, account, order options
  4. Product Browser — Product grid component
  5. Calculator — Pricing calculator
  • Integrating HTML Themes — Step-by-step guide for merging this skeleton with your HTML template
  • Master Pages — Full hierarchy of master pages that extend this root layout
  • Server Controls — Detailed reference for each control used in the skeleton
  • Theme Structure — Complete file and folder layout surrounding the master page

On this page