A Value display control. Introduced in v2.11.
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.
Each occurrence of the control links to a single Characteristic. To choose the specific Characteristic that will be used, provide its unique Characteristic Family path (e.g., "Family Name/Characteristic Name"). You can do this using the CharacteristicPath property.
In order to set a specific object ID, specify one of the following properties: Account_ID, Category_ID, ViewList_ID, Customer_ID, CustomerClass_ID, or Item_ID. By doing so, the ID specified overrides the default ID determined by the control's automatic processing.
Characteristics of the URL-type can be displayed in one of three display modes using the UrlDisplayMode property's available options:
- Link - a standard HTML text link that uses the Characteristic's value as the link URL.
- Image - a standard HTML image using the Characteristic's value as the image source.
-
Button - an HTML button that, when clicked, opens the path defined in the Characteristic's value as the URL.
When displaying a URL-type as a Button, set the text within the button via the ButtonText property. In addition to inserting the desired text, you can also use the following .
Replacement Tag |
Description |
[Label] |
The defined Label text of the Characteristic as configured in the Characteristic's Setup. |
The size of the displayed image or button can be set using the Width and Height properties.
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 for an inline image.
<Control src="CharacteristicValueDisplayControl.ascx" Name="CharacteristicValueDisplay"
CharacteristicPath="Family/Characteristic Name"
UrlDisplayMode="Image"
Width="100"
Height="100"
CharacteristicDisplayCSSClass="SomeClassName"
/>
See an example of how to configure this control in SitePages.config for a link.
<Control src="CharacteristicValueDisplayControl.ascx" Name="CharacteristicValueDisplay"
CharacteristicPath="Family/Characteristic Name"
UrlDisplayMode="Link"
LinkWindowName="WindowName"
CharacteristicDisplayCSSClass="SomeClassName"
/>
See an example of how to configure this control in SitePages.config for a button.
<Control src="CharacteristicValueDisplayControl.ascx" Name="CharacteristicValueDisplay"
CharacteristicPath="Family/Characteristic Name"
UrlDisplayMode="Button"
ButtonText="[Label]"
LinkWindowName="WindowName"
CharacteristicDisplayCSSClass="SomeClassName"
/>
There are no default CSS classes used by the CharacteristicValueDisplayControl. However, you can create a custom class and assign it to the control by specifying this in the CharacteristicDisplayCSSClass property.
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="CharacteristicValueDisplayControl.ascx.cs" Inherits="Dovetail.Ecommerce.Controls.CharacteristicValueDisplayControl" %>
<dx:ASPxButton ID="btnCharacteristicUrl" runat="server" AutoPostback="false" Visible="false" />
<dx:ASPxImage ID="imgCharacteristicUrl" runat="server" Visible="false" />
<dx:ASPxLabel ID="lblCharacteristicText" runat="server" Visible="false" />