This chapter contains full description of controls mentioned in the Customizing HTML Code of Sitebuilder Modules section.
This control is intended to insert HTML code of a control specified in the ID attribute to a specific place in HTML code of a page.
For details on how to customize HTML code of a control specified in the ID attribute, refer to the Customizing Presentation of Controls section.
Sample
<SiteBuilder:Container ID="Pager" />
This control is used to display a variable value in an HTML layer. This layer is hidden when the value is empty.
Attributes
The control has the following attributes:
Name |
Value |
ID |
Variable name |
class |
SCC class selector applied to the layer |
style |
Element defining the layer style |
Variables
Text. Defines place in HTML code where the value of a variable specified by the ID argument is inserted.
Sample
To create a layer containing variable $CategoryName$, you can use the following code:
<SiteBuilder:TextDiv ID="CategoryName" class="category-block" style="padding: 10px; margin: 10px 0 0 0;"/>
For instance, $CategoryName$ is equal to "My category". After processing by Sitebuilder, the page will contain the following code instead of the control:
<div class="category-block" style="padding: 10px; margin: 10px 0 0 0;">My category</div>
If $CategoryName$ is equal to "", the layer will not be created. It means that Sitebuilder processor simply removes the control when rendering HTML code.
The following example shows the $Text$ variable usage. The following code:
<SiteBuilder:TextDiv ID="CategoryName">
<table>
<tr><td>$Text$</td></tr>
</table>
</SiteBuilder:TextDiv>
will look as follows after rendering:
<div>
<table>
<tr><td>My category</td></tr>
</table>
</div>
Note: Some variables cannot be wrapped into a layer. For instance, $Url$ variable of the SiteMenu control.
This control is used to create layout for a complex object that includes header, one or more similar items and footer. For instance, a list of Blog comments is presented using this control.
The list control is rendered by Sitebuilder according to the following schema:
HeaderTemplate is inserted into HTML code of a page instead of the list control.ItemTemplate or AlternatingItemTemplate elements is inserted.FooterTemplate is inserted into HTML code after the code fragment pertaining to a last list element code.
If the inserted code contained Sitebuilder variables, they are substituted by their values.
Control elements
Name |
Value |
ItemTemplate |
Contains HTML code of a list item. |
AlternatingItemTemplate |
Contains HTML code of an even list item. If not defined, |
SeparatorTemplate |
Contains HTML code of a separator between list items. If not defined, a separator is not displayed. |
HeaderTemplate |
Contains HTML code of a list header. If not defined, the header is not displayed. |
FooterTemplate |
Contains HTML code of a list footer. If not defined, the footer is not displayed. |
Sample
Say, there is a blog with three comments: "First comment", "Second comment" and "Third comment". To create layout for the comments, add the following fragment to the HTML code of the blog page.
<SiteBuilder:List ID="EntryList">
<ItemTemplate>
<div>$Title$</div>
</ItemTemplate>
</SiteBuilder:List>
After processing, the control will be substituted by the following HTML fragment:
<div>First comment</div>
<div>Second comment</div>
<div>Third comment</div>
For details on variables used in the sample, refer to the List of Blog posts>Strict Definition section.