CyberStore E-Payment 2023 Documentation
CatalogItemTextLinkListControl Class
Members  Example 


Dovetail.Ecommerce.Controls Namespace : CatalogItemTextLinkListControl Class
A catalog Item text link list control. Introduced in v2.11.
Remarks

The CatalogItemTextLinkListControl allows you to create a list of Items based on a Category. As an additional navigational device, the list presents the shopper with links to the "Item Detail" pages of sibling Items.

 

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.

The Category that is used to filter the list of Items can be specified with the Category_ID property. If this property is not set, it is determined automatically from the Item's context.

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.

To set the preferred format in which you would like your list to appear, use the DisplayMode property. You can choose from the following DisplayModes:

Use the ItemLinkText and HeadlineText properties to set the Item text and Headline text. You can include any of the following replacement tags in these properties:

Replacement Tag
[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.

By default, when you are on an "Item Detail" page for a particular Item, that Item will appear within the list as text-only rather than linked. To hide the active Item, set the ShowActiveItem property to false.   

Properties Inherited from the Base ListingControl

The properties contained in the ListingControl base class are available to either include or exclude certain data from the scope of Items being listed in the control.

To expand the scope of Items to be inclusive of all Items in the current Category and all of its child hierarchy, set the IncludeItemsFromAllChildCategories property to true, or conversely to limit scope just to the current Category, set its value to false.

Scope can also be limited, or expanded, based on the type of Item in the listing. Use the IncludeModelsIncludeSKUs, and IncludeStockCodes properties to do this. Set them to true to include, and false to exclude.

The ShowOnStockCodeDetailPageShowOnModelDetailPage and ShowonSKUDetailPage properties can each be used to selectively hide or show the control when on it is found on an item page based on the type of item.

The OverrideCategoryList property allows for the ListingControl to ignore the current Category in context and use a specified list of Categories as specified by a comma-separated list of Category_ID values. For example "1,5,7,124,678".

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="CatalogItemTextLinkListControl.ascx" Name="ItemList"
     DisplayMode="BulletList"
     ItemLinkText="[Item_Name]"
     WrapperCSSClass="ItemTextListWrapper"
     ItemCSSClass="ItemTextListItem"
     LinkCSSClass="ItemTextListLink"
     ShowActiveItem="true"
     ActiveItemCSSClass="active"
     HeadlineText="More like [Item_StockCode]"
     HeadlineTextCSSClass="ItemTextListHeadline"
 />
CSS Classes

Use the WrapperCSSClassItemCSSClassLinkCSSClassActiveItemCSSClass, and HeadlineCSSClass properties to make stylistic changes within the control.

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="CatalogItemTextLinkListControl.ascx.cs" Inherits="Dovetail.Ecommerce.Controls.CatalogItemTextLinkListControl" %>
<h4 ID="Headline" runat="server"></h4>   
Inheritance Hierarchy

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

See Also

Reference

CatalogItemTextLinkListControl Members
Dovetail.Ecommerce.Controls Namespace