PagerViewModel

Overview

The PagerViewModel is used to render the paging feature on many other views, including the category and product viewer. This article will help you understand what's available to you in this view model.

Requirements

The following pre-requisites will be necessary to accomplish the goals of this article:

  • General understanding of template engines
  • Understanding HTML, CSS, JavaScript
  • Familiarity with template languages
  • Familiarity with ASP.NET MVC Razor

Getting Started

There are no tasks needed to get started with understanding this object. 

PagerViewModel

The PagerViewModel object will contain all of the details of a single instance of placing an order in your Hotcakes Commerce store.

Members

The following table gives you details on the various members of the PagerViewModel object.  The descriptions are based on default functionality and the default Viewset included with Hotcakes.

Member Type Description
CurrentPage Integer

This will be the page number of the current page.  If you're viewing the page for the first time, then this is most likely 1.  Once you proceed to the next page, it might be 2, and so on.

PageRange Integer This property is used to calculate the number of total pages, but in most cases it should match the TotalPages property in this same view model.  You should use that value first.
PageUrlFormat String Since the solution is multilingual, URL formats can be different from site to site, or at any given point due to a configuration change.  This value is populated server-side to help your viewset properly format the URL's for each page in the pager.
PageUrlFormatFirst String This is nearly the same as the PageUrlFormat property, but this format is for the first page in the pager list only, since it doesn't require a page number.
PageSize Integer This value will represent the number of items shown in each page.  The value is also helpful and used for calculating the total number of pages.
TotalItems Integer Represents the total number of items returned for the view that's using the pager.  This is often used to display the number of search or product results to customers in a view.
TotalPages Integer This represents the total number of available pages, based upon the total items and page size.

 

Have more questions? Submit a request

Need More Help?

Do you need more assistance with this article? Please review your support options.