A novo literature rack control. Introduced in v2.5.
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.
Configuring Literature Display Scope
The NovoLiteratureRackControl uses Literature Rack Categories to determine which Literature items to include in scope. The control allows for specifying which category to use when determining what Literature items to display by including the name of the category in the LiteratureCategoryName property. To show all Literature items no matter category, do not set the LiteratureCateogryName property, and set the ShowAllLiteratureWhenCategoryNotFound property to true.
In novo Literature use stories where Literature category names exist which match Item Stockcodes and the NovoLiteratureRackControl is placed onto an Item Detail Page, automatic linking between the stock code and the Literature category can be achieved by using the UseStockCodeAsCategoryName property an setting it to true.
Controlling Headline Usage
When displaying the list of Literature items with the NovoLiteratureRackControl, a headline can be displayed above the list. To override the default headline text from "Literature" to whatever text you wish to use, set the LiteratureRackHeadlineText property . You can also choose to hide the headline altogether by setting the ShowLiteratureRackHeadline property to false.
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.
Pre-Defined CSS Class Names
The output of the Literature Rack items produces HTML content in the form of a table that will include references to the following pre-defined CSS classes.
CSS Class |
Applied To |
.LiteratureRackHeadlineHighlight |
The <div> wrapper that contains the headline. |
.LiteratureHeadline |
The <span> that contains the actual headline text. |
.LiteratureTable |
The <table> that contains the Literature items |
.LiteratureRow |
The <tr> tag for a single row in the Literature table. |
.LiteratureCell |
The <td> tag for a single cell in a Literature table row. |
.LTR_LiteraturePDFLink |
The <a href...> tag of the link to the Literature item. |
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="NovoLiteratureRackControl.ascx.cs" Inherits="Dovetail.Ecommerce.Controls.NovoLiteratureRackControl" %>
<div id="divLiteratureRackHeadlineHighlight" runat="server" class="LiteratureRackHeadlineHighlight">
<asp:Label runat="server" ID="lblLiteraturerRackHeadline" CssClass="LiteratureHeadline"></asp:Label>
</div>
<table class="LiteratureTable">
<asp:DataList ID="dlLiteratureRackItems" EnableViewState="false" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<TR class="LiteratureRow" >
<TD class="LiteratureCell">
<a href="<%# String.Format("{0}/5-{1}-{2}.aspx",GoURL, DataBinder.Eval(Container.DataItem, "Literature_ID").ToString(), Server.UrlEncode(DataBinder.Eval(Container.DataItem, "Title").ToString().Replace(" ", "-"))) %>" class="LTR_LiteraturePDFLink" target="_blank">
<%# DataBinder.Eval(Container.DataItem, "Title") %>
</a>
</TD>
</TR>
</ItemTemplate>
<FooterTemplate>
</FooterTemplate>
</asp:DataList>
</table>