A breadcrumb control. Introduced in v2.7.
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["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
- Contextual Properties
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 ComConfig, UserData 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.
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]"
/>
To customize the style of the elements within the control, use the available CSS classes. These include:
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" />