SiteBuilder Template Creation
The freeform templates are based on html table skeletons.
The possible configurations of table rows and table cells are unlimited.
Each table cell is a separate editable section in the SiteBuilder section editor.
That is, any cell my be defined as any type section. This fact should not prevent
the design of specific cells for specific section types, such as image sections,
text or email forms.
To Create a Template
1) Start with the desired, complete HTML table code. Any combination of rows and
cells is fine.
2) The BORDER attribute should be set to "1" This will define the sections
while in edit mode (the save routine will set this to "0" when the page
is rendered)
3) From the top down, number the attributes of each cell in sequence starting with
the number one. The attributes altered by the editor are shown in the sample templates
BGCOLOR ALIGN VALIGN Other attributes my be added to any row or cell, such as CELLPADDING
or CELLSPACING
4) Inside each TABLE CELL, type in all caps the word SECTION followed by a sequential
number for that section. The prefix number for the attributes for a given CELL
and the SECTION prefix inside that cell should match. Beware copy and paste.
5) Each template must have a single ROW with a single full width CELL as the top
and bottom rows. (See the header
section and footer
section in the sample template
code below) These
ROWS create the header and footer sections recognized by Sitebuilder for the update
headers or footers routine.
6) Any valid HTML may be placed before or after the TABLE and will be saved with
each file created with the template (see the CENTER tags with the example)
Add the Template to Sitebuilder
1) Name the template file any named desired with a .html extension and upload the
file into the SiteBuilder root templates directory. (the
templates directory was created when SiteBuilder was installed)
2) Create a link, either a graphic link from a thumbnail image or a text description
link. The link should have the following arguments where "newtemplate.html"
is the file name of the template.
http://www.domain.com/cgi-bin/miva?sitebuilder/builder.mv+control=name_file&template=newtemplate
Clicking the new link will present the standard SiteBuilder screen to name the new
html file. When the "Continue" button is clicked, the new template will
read into the SiteBuilder section editor ready for editing and saving.
Sample Template
Template Code
<CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="4">
<TR>
<TD COLSPAN="2" BGCOLOR1 ALIGN1 VALIGN1>
SECTION1 header section
</TD>
</TR>
<TR>
<TD BGCOLOR2 ALIGN2 VALIGN2>
SECTION2 left side bar
</TD>
<TD BGCOLOR3 ALIGN3 VALIGN3>
SECTION3 document body
</TD>
</TR>
<TR>
<TD COLSPAN="2" BGCOLOR4 ALIGN4 VALIGN4>
SECTION4 footer section
</TD>
</TR>
</TABLE>
</CENTER>