2. Two blocks loop and load another template in one template.
Main template file main code
<title>{myname} template-{webName}</title>
</head>
<body>
<table cellspacing="2" border="1">
<tr><td>What kind of animals do you like below</td></tr>
<!-- begin list1 -->
<tr><td><input type="radio" name="chk">{animal}</td></tr>
<tr bgcolor="#3366FF"><td height="10"></td>
</tr>
<!-- end list1 -->
<!-- begin list2 -->
<tr><td><input type="radio" name="chk">{animal2}</td></tr>
<tr bgcolor="#3366FF"><td height="10"></td>
</tr>
<!-- end list2 -->
<tr><td colspan="2">{PageNo}</td></tr>
</table>
</body>
Sub-template file main code
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30">This is a template that is nested in</td>
</tr>
<tr>
<td height="30"><!-- begin inList -->{inStr} <!-- end inList --></td>
</tr>
</table>
Replace the template code
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file=""-->
<%
="utf-8"
set newTpl=new tpl
=""
"myname", "two blocks loop/necked"
"webName", "Light-Light Blog"
="list1"
for i=0 to 2
"animal","animal"&i
next
"list1"
="list2"
for m=0 to 2
"animal2", "animal"&m
next
"list2"
'Loading the secondary template
"PageNo",""
'Replace the content in the secondary template
="inList"
for k=0 to 3
"inStr","menu"&k
next
"inList"
set newTpl=nothing
%>
Previous page1234Next pageRead the full text