在频道页中用自定义SQL循环调用其下栏目页或频道页中的内容
外循环:select top 10 id,FolderName from ks_class where tn='{$CurrClassID}' order by folderOrder
循环体:
[loop=30]
<div class="right_about_box">
<div class="right_about_top">
<div class="leftbox_chtxt"><a href="{$Field(id,GetInfoUrl,100,1)}" target="_blank">{$Field(FolderName,Text,0,0,0,)}</a></div>
<div class="leftbox_more"><a href={$Field(id,GetInfoUrl,100,1)}><img src="/images/lanqi_files/more0000.gif" border="0" /></a></div>
</div>
<div class="right_aboutbox">
<div class="right_about_line1"></div>
<div class="right_about_nei1">
{SQL_产品终极页循环({$Field(id,GetInfoUrl,100,2)})}
</div>
<div class="right_about_line2"></div>
</div>
示范:http://www.shdazhongbanjia.cn/html/list_649.html
</div>
[/loop]
内循环:select top 4 id,title,hits,picturecontent,photourl,author,origin from KS_photo where tid in (Select ID From KS_Class Where DelTF=0 AND TS LIKE '%{$Param(0)}%') and deltf=0 and verific=1 order by id desc
循环体:
<div class="pro">
<ul>
[loop=16]
<li><a href="{$Field(id,GetInfoUrl,2,1)}" title="{$Field(title,Text,0,0,0,)}"><Img Src="{$Field(photourl,Text,0,0,0,)}" border="0" width="160" height="125" align="absmiddle" class="KS_Pic"/></a><br /><a href="{$Field(id,GetInfoUrl,2,1)}" title="{$Field(title,Text,0,0,0,)}">{$Field(title,Text,0,0,0,)}</a></li>
</ul>
[/loop]
</div>