The SingleCategoryViewModel is the primary model used whenever a listing of categories is shown to customers. This article will help you understand what's available to you in the view model.
The following pre-requisites will be necessary to accomplish the goals of this article:
- General understanding of template engines
- Familiarity with template languages
- Familiarity with ASP.NET MVC Razor
There are no tasks needed to get started with understanding this object.
The SingleCategoryViewModel object will contain all of the details of a single instance of a category in your Hotcakes Commerce store.
The following table gives you details on the various members of the SingleCategoryViewModel object. The descriptions are based on default functionality and the default Viewset included with Hotcakes.
This value is the same as the category name, but it's used as a replacement when a category doesn't have an image, and in the tooltip for category links.
|IconUrl||String||This property is the URL for the image that represents the category.|
|LinkUrl||String||The permanent URL for the category will be found in this property.|
|LocalCategory||CategorySnapshot||This is the full category object that can be used for any other category properties that you don't already see here in the top level of this object.|
|Name||String||The name of the category.|
|OpenInNewWindow||Bool||This value will normally always return false, except in the case of the category rotator content block.|