This chapter contains full description of the controls mentioned in the Customizing HTML Code of Sitebuilder Modules section.
This control is intended to reserve place where an HTML code should be rendered. You cannot customize this HTML through this control, just change the place where it will be displayed.
Sample
<SiteBuilder:Container ID="Pager" />
This control is very useful when you need to display a text on some div with background and this div must be hidden when the text is empty. (This behavior has $CategoryDescription$ variable in start page of the Blog module. If we use simple template variable then white block will not disappear when no category is chosen.) You can use this control instead of simple template variable – just use the variable's name as value for the ID attribute.
Attributes
These attributes will be applied to div that wraps text.
Name |
Value |
class |
Name of Cascading Style Sheet (CSS) class applied to div tag |
style |
Style attribute for div tag |
Variables
Text - if the TextDiv control contains HTML code, then you should use the Text variable to specify where the variable for which the TextDiv control is used will be displayed.
Sample
Instead of variable $CategoryName$ you can use:
<SiteBuilder:TextDiv ID="CategoryName" class="category-block" style="padding: 10px; margin: 10px 0 0 0;"/>
After processing, the page will contain the following tag instead of this control (if $CategoryName$ equals "My category"):
<div class="category-block" style="padding: 10px; margin: 10px 0 0 0;">My category</div>
If category name is not specified, no tag will appear at all.
Thus, you can predefine a visual block which will appear for a certain variable only when the value of this variable is not null.
If you want to manage the content of such visual block, you can specify the following HTML code for the TextDiv control:
<SiteBuilder:TextDiv ID="CategoryName">
<table>
<tr><td>$Text$</td></tr>
</table>
</SiteBuilder:TextDiv>
Such description of the control will render the following HTML code:
<div>
<table>
<tr><td>My category</td></tr>
</table>
<div>
Note that for some variables, for example, $Url$ in the SiteMenu control, the TextDiv control cannot be used.
This control describes the layout of list of some elements using templates. With these templates you can define how header of the list must be displayed, what HTML must be placed in a footer of the list, how an item must be displayed, etc. To clearly understand how it works, see the sample below.
Attributes
No special design attributes for this tag.
Control Templates
If you are new to the idea of list template, please see the sample below.
Name |
Value |
ItemTemplate |
Required template that provides the content and layout for items in the |
AlternatingItemTemplate |
If defined, provides the content and layout for alternating items in the List. If not defined, |
SeparatorTemplate |
If defined, provides the content and layout for the separator between items in the |
HeaderTemplate |
If defined, provides the content and layout for the header section of the |
FooterTemplate |
If defined, provides the content and layout for the footer section of the |
Sample
Let us imagine: there are 3 different comments to display: "First comment", "Second comment" and "Third comment". We need to describe how these comments will be displayed on the page. So we write something like this:
<SiteBuilder:List ID="EntryList">
<ItemTemplate>
<div>$Comment$</div>
</ItemTemplate>
</SiteBuilder:List>
And after processing it will be displayed like this:
<div>First comment</div>
<div>Second comment</div>
<div>Third comment</div>
Or we can display these comment in some table. Then we will write the following:
<SiteBuilder:List ID="EntryList">
<HeaderTemplate>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
</HeaderTemplate>
<ItemTemplate>
<tr><td>$Comment$</td></tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</SiteBuilder:List>
After processing it will be displayed like this:
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td>First comment</td></tr>
<tr><td>Second comment</td></tr>
<tr><td>Third comment</td></tr>
</table>
This control represents HTML anchor. It could be displayed as a simple text link or some image. By default, it is a text link.
Attributes
Name |
Value |
class |
Name of Cascading Style Sheet (CSS) class applied to anchor tag. |
style |
Style attribute for anchor tag. |
Variables
- if the TextLink control contains HTML code, then you should use this variable to specify the location where the link name will be displayed.
Sample
The simplest way to describe some link with ID SomeID:
<SiteBuilder:Link ID="SomeID" class="top-link" />
To specify an arbitrary content for the link, give the following description to the control:
<SiteBuilder:Link ID="SomeID">
$Text$<img src="$Theme$/images/someimage.gif" border="0" />
</SiteBuilder:Link>
This control displays HTML text input on some form.
Attributes
Name |
Value |
class |
Name of Cascading Style Sheet (CSS) class applied to HTML text input control. |
style |
Style attribute for HTML text input control. |
Sample
<SiteBuilder:TextInput ID="AuthorInput" class="mod-input" style="width: 100%" />
This control displays error message if a user enters invalid data into some form.
Attributes
Name |
Value |
Display |
Display behavior of the error message. Default value is |
class |
Name of Cascading Style Sheet (CSS) class applied to this control. |
style |
Style attribute for control HTML tag. |
Sample
<SiteBuilder:ValidationText Display="Static" ID="AuthorIsRequired" />
This control displays a button control on a page. It can be simple or link-style button.
Attributes
Name |
Value |
class |
Name of Cascading Style Sheet (CSS) class applied to this control. |
Type |
Type of button control. Can be Button or Link. Default is Button. |
style |
Style attribute for control HTML tag. |
Variables
- if the TextTextInput control contains HTML code, then you should use this variable to specify where the button text will be displayed.
Sample
<SiteBuilder:Button ID="AddMessage" class="mod-form-button" />
To specify an arbitrary content for the button text, give the following description to the control:
<SiteBuilder:Button ID="AddMessage">
<table>
<tr><td>$Text$</td></tr>
</table>
</SiteBuilder:Button>