CyberStore E-Payment 2023 Documentation
CatalogCategoryBreadcrumbControl Class
Members  Example 


Dovetail.Ecommerce.Controls Namespace : CatalogCategoryBreadcrumbControl Class

A catalog Category breadcrumb control. Introduced in v2.7.

Remarks

The CatalogCategoryBreadcrumbControl displays the current Category's hierarchy. This includes all Parent Categories as a series of hyperlinks and an optional link to the CyberStore homepage.

The hierarchy of Categories appears in a breadcrumb representation. The breadcrumb shows the path that the shopper would use to navigate your Site in order to access that Item or Category page. This path typically begins with the Site name and follows with higher level Categories that narrow in scope.

 

Category Page

When the control occurs within a Category page, the breadcrumb trail contains these parts:

  1. A link to the Site's homepage (optional)
  2. Links to each of the parent Categories in the path, in descending order from the highest level
  3. The Category name relative to that page

Each part of the trail is divided by a separator and must appear in the order listed above.

See the following example of a Category page trail:

http://theoutdoorscompany.com/ECommerce/category/performance-bicycles

Item Page

When the control occurs within an Item page, the breadcrumb trail contains these parts:

  1. A link to the Site's homepage (optional)
  2. Links to each of the parent Categories in the path, in descending order from the highest level
  3. A link to the Category that the Item belongs to
  4. The Item name

Each part of the trail is divided by a separator and must appear in the order listed above.

See the following example of an Item page trail:

http://theoutdoorscompany.com/ecommerce/product/a201/bicycle-chain-and-lock

When an Item page represents a SKU, the name of the Item is immediately preceded by a link to its Model Item. Otherwise, the order of the trail remains the same.

See the following example of an Item page trail for a SKU:

http://theoutdoorscompany.com/ecommerce/product/helmet/catlike-leaf-helmet/a301

Property Usage

By changing the values of the control's properties in the SitePages.config file for your Site, you can enable or disable certain behaviors, set certain defaults, alter aspects of the display or otherwise cusomtize your site's implementaion of the control.

The following describes properties pertaining to key functional areas of the control that can be configured to suit your needs.

General

The hierarchy from which the Category stems can be specified by the Category_ID property. If this property is not set, the hierarchy is determined by the Category page address for the current page. On an Item page, the the hierarchy is determined using information from the last known Category page visited.

Developer's Note:

The control determines the Category for an Item after first evaluating the last known Category page visited. It can identify the Category_ID stored in the CyberStore Session Variable Session["LastCategory_ID"] and check whether that Category contains the Item. If the Item is not a member of that Category, the control defaults to the first Category that contains the Item.

By default, the CatalogCategoryBreadcrumbControl shows a link to the homepage at the beginning of the breadcrumb trail. You can customize the text representing the homepage link with the HomeLinkLabelText property. If you do not want this link to appear at all within the trail, set the IncludeHomeLink property to false.

There is a text divider between each link in the breadcrumb trail. Customize the divider using the DividerText property.

Item Page

The Item specified by the breadcrumb trail is determined by the Item_ID property. If this property is not set, it is determined by the Item page address for the current page or by the QueryString Variable (QueryString["IID"]).

When the control occurs within an Item page, you can customize the the text within the trail that represents the Item using the BreadcrumbItemLabelText property. This property can include the following replacement tags:

Replacement Tags
[Item_Name] The Name (SYSPRO Description) of the Item.
[Item_StockCode] The Stock Code of the Item.
[Item_Headline] The CyberStore Headline of the Item.
[Item_SubHeadline] The CyberStore Sub Headline of the Item.
[Item_ShortDescription] The CyberStore Short Description of the Item.
[Item_LongDescription2] The Long Description 2 (SYSPRO Long Description) of the Item.

When this Item page represents a SKU, by default the breadcrumb trail contains the Model Item for the SKU. To override this behavior and not show the Model Item in the trail, set the EndWithItem property to true.

You can customize the text within the trail that represents the Model Item using the BreadcrumbModelLabelText property. This property can include the following replacement tags:

Replacement Tags
[Model_Name] The CyberStore Name of the SKU Item's Model.
[Model_StockCode] The CyberStore StockCode of the SKU Item's Model.
[Model_Headline] The CyberStore Headline of the Item.
[Model_SubHeadline] The CyberStore Sub Headline of the SKU Item's Model.
[Model_ShortDescription] The CyberStore Short Description of the SKU Item's Model.
[Model_LongDescription2] The Long Description 2 (SYSPRO Long Description) of the SKU Item's Model.

 

Properties Inherited from the Base CyberStoreBaseControl

Properties specific to the CyberStoreBaseControl can be listed in the following categories:

Override Properties

When the IgnoreControl property is set to true, all processing of a control is skipped, and the control's Visible property is set to false ensuring that it is not rendered in the resulting CyberStore page.

Contextual Properties

Contextual properties define specific details about the current instance of the control based on context. Context can be set by any number of factors including the log in state of the Shopper, the Site being visited, or the properties that have been established for a control.

The AttributesBag property is used internal to control processing and is the collection of attributes, or properties, and their values based on how the control is configured. The attributes in this property are set by processing the SitePages.config file as well as any specific declared property values in any registered sub controls. It allows for the passing down of all properties to a control and any registered sub controls.

The ComConfigUserData and Site_ID properties are read-only values made available to all CyberStore controls to aid in processing and establishing context about the Site and Shopper.

Example
See an example of how to configure this control in SitePages.config.
<Control src="CatalogCategoryBreadcrumbControl.ascx" Name="Breadcrumb" 
    IncludeHomeLink="true" 
    HomeLinkLabelText="Home"  
    DividerText=" > " 
    BreadcrumbCSSClass="CategoryBreadcrumb"
    BreadcrumbHomeLinkCSSClass="CategoryBreadcrumbHomeLink"
    BreadcrumbLinkCSSClass="CategoryBreadcrumbLink"
    BreadcrumbDividerCSSClass="CategoryBreadcrumbDivider"
    BreadcrumbLastCategoryCSSClass="CategoryBreadcrumbLastCategory"
    BreadcrumbItemLabelText="[Item_Name]"
    BreachcrumbModelLabelText="[Model_Name]"
/>
CSS Classes

To customize the style of the elements within the control, use the available CSS classes. These include:

Control Markup

The following is the markup for this control.

Developer's Note:

To create a custom version of the control, copy all of the code below into a file of the same name and place it into your Site's control folder (e.g., ../YourSiteFolder/Control). The CyberStore page engine will then override the default markup with your customized version.

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CatalogCategoryBreadcrumbControl.ascx.cs"
    Inherits="Dovetail.Ecommerce.Controls.CatalogCategoryBreadcrumbControl" %>

<dx:ASPxLabel ID="lblCategoryBreadcrumb" runat="server" EncodeHtml="false" />
Inheritance Hierarchy

System.Object
   System.Web.UI.Control
      System.Web.UI.TemplateControl
         System.Web.UI.UserControl
            Dovetail.Ecommerce.ControlBases.CyberStoreBaseControl
               Dovetail.Ecommerce.Controls.CatalogCategoryBreadcrumbControl

See Also

Reference

CatalogCategoryBreadcrumbControl Members
Dovetail.Ecommerce.Controls Namespace