This class supports circular substitution, supports nested loops substitution, and supports multiple templates.
Class code will not stick to verbose, in the back of the download, only posted the demo code.
One, the template has only one loop block
Template file Main code
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title>{myname} template-{webname}</title>
<body>
<table width= "border=" 0 "cellspacing=" 0 "cellpadding=" 0 ">
<!--begin A_block-->
<tr>
<TD width= "height=" > The first column </td>
<TD width= "height=" >{tpl_1}</td>
<TD width= "height=" >{tpl_2}</td>
</tr>
<!--end A_block-->
</table>
</body>
Replace the code for the template
<% @LANGUAGE = "VBSCRIPT" codepage= "65001"%>
<!--#include file= "tplcls.asp"-->
<%
Response. charset= "Utf-8"
Set Newtpl=new TPL
Newtpl.settpl= "Tpl.html"
Newtpl.setvar "MyName", "one block cycle"
Newtpl.setvar "WebName", "Bright Blog"
newtpl.setblock= "A_block"
For tt=0 to 2
Newtpl.setblovar "Tpl_1", "second column _" &tt
Newtpl.setblovar "Tpl_2", "third column _" &tt
Newtpl.outblovar
Next
Newtpl.outblock "A_block"
Newtpl.out
Set newtpl=nothing
%>
Current 1/4 page
1234 Next read the full text