Source code of tbs_us_examples_subtpl.htm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>TinyButStrong - Example of sub-template</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./tbs_us_examples_styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main-body">
<h1>Example of sub-template</h1>
<div class="w3cinfo"> this TBS template is W3C compliant <a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml11" alt="Valid XHTML 1.1" height="31" width="88" style="border:none;" /></a> </div>
<div id="example">
<p>Parameter <samp>file</samp> enables you to include a static sub-template into the main template. Parameter <samp>script</samp>, with parameter <samp>subtpl</samp>, enable you to include a dynamic sub-template.</p>
<p> In this example, header and footer are static sub-templates.
Headings are also static-sub-templates but they depends to a global variable ($tmpl_article). The login area is a dynamic sub-template. It is managed by a sub-script which can be run under the TBS Subtemplate Mode.</p>
<table border="1" cellspacing="0" cellpadding="2" style="width:500px;">
<tr valign="top">
<td colspan="2" style="background-color:#D1F3D2; height:40px;">[onload;file='tbs_us_examples_subtpl_header.htm';getbody]</td>
</tr>
<tr>
<td colspan="2" valign="top" style="background-color:#FFCC99;">[onload;script=tbs_us_examples_subtpl_login.php;subtpl;getbody]</td>
</tr>
<tr>
<td valign="top" style="background-color:#FFCCCC; width:120px;">[onload;file=[var.tmpl_menu];getbody=body]</td>
<td valign="top" style="background-color:#B1B1B1; height:120px;">[onload;file=[var.tmpl_article];getbody]</td>
</tr>
<tr>
<td colspan="2" valign="top" style="background-color:#D1F3D2">[onload;file='tbs_us_examples_subtpl_footer.htm';getbody]</td>
</tr>
</table>
<ul>
<li>See <a href="[onload.viewer]?e=subtpl&s=header&m=template">Header</a> sub-template</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=footer&m=template">Footer</a> sub-template</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=menu&m=template">Menu</a> sub-template</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=article0&m=template">Main Page</a> sub-template</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=article1&m=template">Heading 1</a> sub-template</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=article2&m=template">Heading 2</a> sub-template</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=article3&m=template">Heading 3</a> sub-template</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=login&m=php">Login</a> sub-script source</li>
<li>See <a href="[onload.viewer]?e=subtpl&s=login&m=template">Login</a> sub-template</li>
</ul>
</div></div>
</body>
</html>