首先是顶部的导航高亮:
{if:{field:fatherid}=0}
<!–channel:{ $row=10 $table=channel $where=fatherid=0 $order=[ID] Asc}–>
<li {-if:{field:id}=[channel:id]} {-end if}><a href='[channel:curl]’>[channel:cname]</a></li>
<!–channel–>
{end if}
{if:{field:fatherid}<>0}
<!–channel:{ $row=10 $table=channel $where=fatherid=0 $order=[ID] Asc}–>
<!–channela:{ $row=10 $table=channel $where=id={field:fatherid} $order=[ID] Asc}–>
<li {-if:{field:fatherid}>0 and ({field:id}=[channel:id] or {field:fatherid}=[channel:id] or {field:cid}=[channel:id] or [channela:fatherid]=[channel:id])}{-end if}><a href='[channel:curl]’>[channel:cname]</a></li>
<!–channela–>
<!–channel–>
{end if}
其次是右面的产品栏目高亮:
<!–Tab:{$Row=10 $Sql=Select * From [{pre}channel] where [fatherid]=19 Order By [id] asc,[order] asc }–>
{if:len(“[tab:childid]”)>0 and [Tab:ID]=”{field:fatherid}”}
<li><a href=”[tab:curl]”>[tab:cname]</a></li>
<li>
<!–Taba:{ $Row=10 $Sql=Select * From [{pre}channel] where [fatherid]=[Tab:ID] Order By [id] desc,[order] desc }–>
<p? {-if:{field:cid}=[taba:id]} {-end if}>- <a href=”[taba:curl]”>[taba:cname]</a></p>
<!–taba–>
</li>
{end if}
{if:len(“[tab:childid]”)>0 and [Tab:ID]<>”{field:id}”}
<li><a href=”[tab:curl]”>[tab:cname]</a></li>
{end if}
{if:len(“[tab:childid]”)=0}
<li><a href=”[tab:curl]”>[tab:cname]</a></li>
{end if}
<!–tab–>
不解释!
后我告诉大家,这个标签是修改了
这个文件实现模板中if的嵌套的,程序是V3的 utf-8版本的,后附上附件,相同的版本可以直接覆盖。/uploadfile/201302/21/1741211569.rar
图例地址:www.quanpujishu.com
上一篇: 5ucms 站内搜索插件开发指南
游客回答:(0)