new module:models/Category()
Constructs a new Category
.
Document representing a category.
- Source:
Members
(readonly) CHeaderMenuOrientationEnum :String
Allowed values for the c_headerMenuOrientation
property.
Type:
- String
- Source:
(inner) c_alternativeUrl :String
Renders an alternative URL in main navigation. Uses Salesforce Commerce Cloud content url notation. For example: $url('Account-Show')$ or normal URL http://xchange.demandware.com
Type:
- String
- Source:
(inner) c_catBannerID :String
Used to define the content asset used to populate a grid page banner for a category. This value is applied to all sub-category navigation (cascading) if no specific catBannerID has been defined for a sub-category.
Type:
- String
- Source:
(inner) c_customCSSFile :String
Use this attribute to apply custom styles for this category.
Type:
- String
- Source:
(inner) c_enableCompare :Boolean
Used to define if/when the Compare feature is to be visualized in the storefront based on navigation. If enableCompare = FALSE, no Compare checkboxes will be displayed in the grid view. If enableCompare = TRUE, the category (and its children) will support the Compare feature.
Type:
- Boolean
- Source:
(inner) c_headerMenuBanner :String
Type:
- String
- Source:
(inner) c_headerMenuOrientation :module:models/Category.CHeaderMenuOrientationEnum
Which way to orient the menu and optional header menu HTML. Vertical will list all in one line. Horizontal will list in columns.
Type:
- module:models/Category.CHeaderMenuOrientationEnum
- Source:
(inner) c_showInMenu :Boolean
Used to indicate that a category (such as Mens -> Footwear -> Boots) will display in the roll-over navigation. A sub-category only shows if also the parent category is marked as showInMenu. Up to three category levels are shown in roll-over navigation.
Type:
- Boolean
- Source:
(inner) c_sizeChartID :String
Used to define the content asset ID of the Size Chart that is appropriate for products whose PRIMARY category is the associated category (and its children). Whenever a product detail page (or quick view) is rendered, the Size Chart link is populated based on the value of this attribute for the products primary categorization. If not defined, NO size chart link is displayed.
Type:
- String
- Source:
(inner) c_slotBannerHtml :String
Type:
- String
- Source:
(inner) c_slotBannerImage :String
Image used on either the top or bottom slot on the category landing pages.
Type:
- String
- Source:
(inner) categories :Array.<module:models/Category>
Array of subcategories. Can be empty.
Type:
- Array.<module:models/Category>
- Source:
(inner) description :String
The localized description of the category.
Type:
- String
- Source:
(inner, constant) Horizontal
value: "Horizontal"
- Source:
(inner) id :String
The id of the category.
Type:
- String
- Source:
(inner) image :String
The URL to the category image.
Type:
- String
- Source:
(inner) name :String
The localized name of the category.
Type:
- String
- Source:
(inner) page_description :String
The localized page description of the category.
Type:
- String
- Source:
(inner) page_keywords :String
The localized page keywords of the category.
Type:
- String
- Source:
(inner) page_title :String
The localized page title of the category.
Type:
- String
- Source:
(inner) parent_category_id :String
The id of the parent category.
Type:
- String
- Source:
(inner) thumbnail :String
The URL to the category thumbnail.
Type:
- String
- Source:
(inner, constant) Vertical
value: "Vertical"
- Source:
Methods
(static) constructFromObject(data, obj) → {module:models/Category}
Constructs a Category
from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data
to obj
if supplied or a new instance if not.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The plain JavaScript object bearing properties of interest. |
obj |
module:models/Category | Optional instance to populate. |
- Source:
Returns:
The populated Category
instance.