PrintNowPrintNowDocs
Themes

Object Models

Reference for the data objects available in Print Store theme templates — categories, products, thumbnails, and more.

When EnableCategoryData="True" is set on a master page, PrintNow populates server-side objects that you can access in your theme markup using ASP.NET inline expressions. This page documents each object type, its properties, and usage examples.

CategoryMenuEntry

Lightweight, menu-ready category objects with hierarchical structure. Returned by global functions like AllCategories() and CategoriesByTag().

PropertyTypeDescription
IdIntegerCategory ID.
NameStringCategory display name.
UrlStringSEO-friendly URL for the category page.
DescriptionStringShort category description.
ChildrenList(Of CategoryMenuEntry)Child categories for building hierarchical navigation.
ThumbnailsList(Of ThumbnailEntry)Category thumbnail images.
StartPriceStringFormatted starting price (e.g., "$9.99").

Example: Building a Category Menu

<ul class="category-menu">
<% For Each cat In AllCategories() %>
    <li>
        <a href="<%= cat.Url %>"><%= cat.Name %></a>
        <% If cat.Children IsNot Nothing AndAlso cat.Children.Count > 0 Then %>
        <ul>
            <% For Each child In cat.Children %>
            <li><a href="<%= child.Url %>"><%= child.Name %></a></li>
            <% Next %>
        </ul>
        <% End If %>
    </li>
<% Next %>
</ul>

CategoryEntry

The full category object available as Category on CategoryOverview, SubCategoryOverview, and ProductDetails master pages. Contains all category data including sub-categories, content, tags, and tabs.

PropertyTypeDescriptionExample
IdIntegerCategory ID.<%= Category.Id %>
NameStringCategory display name.<%= Category.Name %>
DescriptionStringShort description text.<%= Category.Description %>
ContentStringFull HTML content.<%= Category.Content %>
SubCategoriesList(Of SubCategoryEntry)Child sub-categories.Requires loop (see below)
TagsList(Of String)Assigned tag names.Requires loop
TabsList(Of TabEntry)Content tabs.Requires loop
ThumbnailsList(Of ThumbnailEntry)Category images.<%= Category.Thumbnails(0).Generate(400, 400, "fill") %>
PageContentStringCMS page content.<%= Category.PageContent %>
PricingContentStringCMS pricing content.<%= Category.PricingContent %>
StartPriceStringFormatted starting price.<%= Category.StartPrice %>

CategoryEntry Functions

FunctionReturnsDescription
ExtendedContent(key As String)StringReturns extended content by key name. Keys are configured in the admin under Extended Content.
HasExtendedContent(key As String)BooleanReturns whether extended content exists for the given key.
<%-- Display extended content sections --%>
<%= Category.ExtendedContent("overview") %>

<%-- Conditionally show a section --%>
<% If Category.HasExtendedContent("Paper&Specs") Then %>
    <div class="specs">
        <%= Category.ExtendedContent("Paper&Specs") %>
    </div>
<% End If %>

Example: Category Overview with Sub-Categories

<% For Each tsCat In Category.SubCategories %>
<div class="col-12 col-sm-6 col-lg-3">
    <a href="<%= tsCat.Url %>">
        <img class="img-fluid" src="<%= tsCat.Thumbnails(0).Generate(255, 255, "fill") %>" alt="<%= tsCat.Name %>">
        <h4><%= tsCat.Name %></h4>
        <span>Starts: <%= tsCat.StartPrice %></span>
    </a>
</div>
<% Next %>

ProductEntry

Available as Product on ProductDetails master pages. Contains all product data including thumbnails, tags, and related products.

PropertyTypeDescriptionExample
IdIntegerProduct ID.<%= Product.Id %>
NameStringProduct display name.<%= Product.Name %>
DescriptionStringShort description.<%= Product.Description %>
ContentStringFull HTML content.<%= Product.Content %>
TagsList(Of String)Assigned tag names.Requires loop
RelatedList(Of RelatedProductEntry)Related products.Requires loop (see below)
ThumbnailsList(Of ThumbnailEntry)Product images.<%= Product.Thumbnails(0).Generate(555, 555, "fill") %>
PageContentStringCMS page content.<%= Product.PageContent %>
PricingContentStringCMS pricing content.<%= Product.PricingContent %>
DisplayOrderIntegerSort order position.<%= Product.DisplayOrder %>
DetailUrlStringSEO URL for the product detail page.<%= Product.DetailUrl %>
ActionUrlStringURL for the product's action (order/customize).<%= Product.ActionUrl %>
CustomizableBooleanWhether the product supports online customization.<%= Product.Customizable %>

Example: Product Detail Page

<h1><%= Product.Name %></h1>

<%-- Thumbnail carousel --%>
<% For Each thumb In Product.Thumbnails %>
    <img class="img-fluid" src="<%= thumb.Generate(555, 555, "fill") %>" alt="<%= thumb.AltText %>">
<% Next %>

<p><%= Product.Description %></p>

<%-- Category tags --%>
<% For Each tag In Category.Tags %>
    <a href="#" class="badge"><%= tag %></a>
<% Next %>

<%-- Related products --%>
<% If Product.Related IsNot Nothing AndAlso Product.Related.Count > 0 Then %>
<h3>Related Products</h3>
<% For Each prod In Product.Related %>
    <a href="<%= prod.Url %>">
        <img src="<%= prod.Thumbnails(0).Generate(255, 255, "fill") %>" alt="<%= prod.Name %>">
        <h4><%= prod.Name %></h4>
    </a>
<% Next %>
<% End If %>

SubCategoryEntry

Child categories within a CategoryEntry.SubCategories collection.

PropertyTypeDescription
IdIntegerSub-category ID.
NameStringSub-category display name.
DescriptionStringShort description.
UrlStringSEO-friendly URL.
ThumbnailsList(Of ThumbnailEntry)Sub-category images.
StartPriceStringFormatted starting price.

ThumbnailEntry

Image objects available on categories, sub-categories, and products.

Property / MethodTypeDescription
UrlStringDefault thumbnail URL.
AltTextStringAlt text for the image.
Generate(width, height, fit, borderWidth, borderColor)StringGenerates a resized thumbnail URL. All parameters are optional.
Raw()StringReturns the original, unprocessed image URL.

Generate() Parameters

ParameterTypeDefaultDescription
widthIntegerTarget width in pixels.
heightIntegerTarget height in pixels.
fitString"center"Resize mode: fill, center, trim, or stretch.
borderWidthInteger0Border width in pixels.
borderColorStringBorder color (hex or named color).

Fit Modes

ModeBehavior
fillScales and crops the image to completely fill the target dimensions. May crop edges.
centerScales the image to fit within the target dimensions, centered. May have whitespace padding.
trimScales to fit and trims any whitespace around the image content.
stretchStretches the image to exactly match the target dimensions. May distort aspect ratio.
<%-- 400x400 filled thumbnail --%>
<img src="<%= thumb.Generate(400, 400, "fill") %>" alt="<%= thumb.AltText %>">

<%-- Raw original image --%>
<img src="<%= thumb.Raw() %>" alt="Full size image">

<%-- 255x255 with 1px border --%>
<img src="<%= thumb.Generate(255, 255, "center", 1) %>" alt="<%= thumb.AltText %>">

RelatedProductEntry

Products in a ProductEntry.Related collection.

PropertyTypeDescription
IdIntegerProduct ID.
NameStringProduct display name.
UrlStringSEO-friendly product URL.
CategoryStringParent category name.
ThumbnailsList(Of ThumbnailEntry)Product images.

TabEntry

Content tabs within a CategoryEntry.Tabs collection.

PropertyTypeDescription
TitleStringTab heading text.
ContentStringTab body content (HTML).
<ul class="nav nav-tabs">
    <% For Each tab In Category.Tabs %>
    <li class="nav-item">
        <a class="nav-link" href="#tab-<%= tab.Title %>" data-toggle="tab"><%= tab.Title %></a>
    </li>
    <% Next %>
</ul>
<div class="tab-content">
    <% For Each tab In Category.Tabs %>
    <div class="tab-pane" id="tab-<%= tab.Title %>">
        <%= tab.Content %>
    </div>
    <% Next %>
</div>

LandingPageEntry

Landing page objects returned by GetLandingPages(). Represents a landing page with its child items, image, and navigation URL.

PropertyTypeDescription
IdIntegerLanding page ID.
NameStringLanding page title.
TypeStringChild type: "Category", "LandingPage", or "Group". Null for top-level pages.
DisplayOrderIntegerSort order position.
IsGroupBooleanTrue if this entry is a group container.
UrlStringSEO-friendly URL for the landing page.
ThumbnailThumbnailEntryHero image for the landing page. For category children, uses the category thumbnail.
ChildrenList(Of LandingPageEntry)All child items (categories, landing pages, groups) sorted by display order.
CategoriesList(Of LandingPageEntry)Only category-type children.
PagesList(Of LandingPageEntry)Only landing page-type children.
GroupsList(Of LandingPageEntry)Only group-type children.

Example: Landing Page Navigation with Thumbnails

<div class="landing-pages">
<% For Each lp In GetLandingPages() %>
    <div class="col-md-4">
        <a href="<%= lp.Url %>">
            <img src="<%= lp.Thumbnail.Url %>?width=200&height=200" alt="<%= lp.Name %>" class="img-fluid" />
            <h4><%= lp.Name %></h4>
        </a>
    </div>
<% Next %>
</div>

ProductTagEntry

Tag objects returned by tag-related functions.

PropertyTypeDescription
NameStringTag display name.
UrlStringURL to filter products by this tag.
  • Data Properties — Global properties and functions that populate these object models
  • Master Pages — Where object models are enabled via the EnableCategoryData directive
  • Extended Content — Configure the content keys used by CategoryEntry.ExtendedContent()
  • Landing Pages — Manage the landing pages returned by GetLandingPages()
  • Tags — Manage the tags used for filtering categories and products

On this page