CharacteristicValueDisplayControl
CharacteristicValueDisplayControl retrieves a configured characteristic value and displays it as a link, inline image, or button. The control is invisible when the selected characteristic has no value.
Select a characteristic
Set CharacteristicPath to the characteristic family path, such as Family Name/Characteristic Name. The control supports characteristics from Account, Item, Category, Customer, Customer Class, and View List family objects.
To override the object selected by automatic processing, configure one applicable ID property: Account_ID, Category_ID, Customer_ID, CustomerClass_ID, Item_ID, or ViewList_ID.
Choose a display mode
Set UrlDisplayMode for URL-type characteristics.
| Mode | Behavior |
|---|---|
Link | Renders a text link using the characteristic value as its URL. Use LinkWindowName to specify the link target window. |
Image | Renders an inline image using the characteristic value as its image source. |
Button | Renders a button that opens the URL in the characteristic value. Use ButtonText to set the label; [Label] inserts the configured characteristic label. |
Use Width and Height to size images or buttons, and CharacteristicDisplayCSSClass to apply a CSS class. The source also supports Text and ImageUrl rendering options for List and MultiSelectList characteristics.
Configurable properties
| Property | Default | Valid values or format | Effect |
|---|---|---|---|
Account_IDInteger | Not specified | Gets or sets the identifier of the account. | |
ButtonTextString | Not specified | Gets or sets the button text. | |
Category_IDInteger | Not specified | Gets or sets the identifier of the category. | |
CharacteristicDisplayCSSClassString | Not specified | Gets or sets the characteristic display CSS class. | |
CharacteristicPathString | Not specified | Gets or sets the Characteristic path. | |
Customer_IDInteger | Not specified | Gets or sets the identifier of the customer. | |
CustomerClass_IDInteger | Not specified | Gets or sets the identifier of the customer class. | |
HeightUnit | Not specified | Gets or sets the height. | |
Item_IDInteger | Not specified | Gets or sets the identifier of the item. | |
LinkWindowNameString | Not specified | Gets or sets a value the name of a window to open links to. | |
ListDisplayModeString | Not specified | Gets or sets the list display mode. | |
UrlDisplayModeNot specified | Not specified | Gets or sets the display mode. | |
ViewList_IDInteger | Not specified | Gets or sets the identifier of the view list. | |
WidthUnit | Not specified | Gets or sets the width. |
SitePages.config example
The following example loads CharacteristicValueDisplayControl.ascx and applies the documented literal defaults. The following properties are omitted because they do not have documented literal defaults: Account_ID, ButtonText, Category_ID, CharacteristicDisplayCSSClass, CharacteristicPath, Customer_ID, CustomerClass_ID, Height, Item_ID, LinkWindowName, ListDisplayMode, UrlDisplayMode, ViewList_ID, Width.
<Control src="CharacteristicValueDisplayControl.ascx" />
Add this <Control> element to the appropriate page placeholder as described in The SitePages.config File.
Inherited properties
CharacteristicValueDisplayControl inherits shared visibility and shopper-access conditions from CyberStoreBaseControl.
Validate the control
- Configure a characteristic path for each intended object type.
- Confirm that the control is hidden when the selected characteristic has no value.
- Test the configured link, image, or button mode with a valid URL value.
- Confirm the configured dimensions, CSS class, and link window behavior where applicable.