5ucms论坛
标题:
5ucms 大分类下调用列表标签例子
[打印本页]
作者:
admin
时间:
2019-2-26 10:04
标题:
5ucms 大分类下调用列表标签例子
固定大类下所有子类内容(不包含子栏目名),如ID=4时
固定大类下所有子类内容(包含子栏目名),如ID=4时
非固定大类下的所有内容
<!--menu:{ $Row=99 $table=Channel $Where=[order]>500 $order=[order] asc}-->
<tr {if:[menu:i] mod 2=0}xxxxxx{end if}>
<a href="[menu:curl]" target="_blank">[menu:cname]</a>
<!--list:{ $row=7 $Sql=select * from [{pre}Content] where [cid] in ([menu:ChildIDs]) Order by [order]desc,[id]desc}-->
<a href="[List:aurl]" target="_blank">[List:titlex]</a>
<!--List-->
<!--menu-->
复制代码
固定大类,调用子类 二级
<!--Main:{ $Table=Channel $Where=[FatherID]=7 $order=[order] desc,[id] desc }-->
<a href="[Main:curl]" target="_blank" title="[Main:cname]">[Main:cname]</a>
<!--Main-->
复制代码
固定大类,调用子类 二级 三级 栏目名称
<!--channel:{ $row=10 $table=channel $where=[fatherid]=0 and [id] not in (1,2,4,10) and [order]>0 $Order=[order] desc,[ID] Desc }-->
<A href="[channel:curl]" target=_self>[channel:cname]</A></DIV>
<!--Main:{ $Table=Channel $Where=[FatherID]=[channel:id] $Order=[order] asc,[ID] Desc }-->
<a href="[Main:curl]">[Main:name]</a>
<!--Main-->
<!--channel-->
复制代码
固定大类,调用三级内容
<!--channel:{ $Table=Channel $Where=[FatherID]=5 and [order]>10 }-->
<a title="[channel:cname]" target="_blank" href="[channel:curl]">[channel:cname]</a>
<!--Father:{$Table=Channel $Where=[ID] IN ([channel:ChildIDs]) and [DeepPath]=2}-->
<!--list:{ $row=10 $mode=uncommend $cid=[Father:childids] $order=[order] desc,[id] desc }-->
<A href="[List:aurl]" title="[List:title]">[List:titlex]</A></LI>
<!--List-->
<!--Father-->
<!--channel-->
复制代码
当前分类下调用文章内容(大类)
<!--channel:{ $row=1 $table=channel $where=id in({field:childid}) $field=table,cid,id,childid,childids}-->
<div class="node">
<div class="title"><a href="[channel:curl]">[channel:cname]</a></div>
<div class="box">
<ul>
<!--artlist:{ $row=1 $table=Content $where=[cid]=[channel:childids] }-->
<li><a href="[artlist:aurl]">[artlist:title]</a></li>
<p><!--c:{$row=1 $table=[channel:table $Replace={pre}##] $where=[aid]=[artlist:id] and [cid] =[artlist:cid] $order=[aid] desc}-->
[c:content]
<!--c-->
</p>
<!--artlist-->
</ul>
</div>
</div>
<!--channel-->
复制代码
当前分类下调用文章内容(小类 不可分页)
<!--channel:{ $row=1 $table=channel $where=[cid] = {field:id}}-->
<!--artlist:{ $row=999 $table=Content $where=[cid]=[channel:childids] }-->
<div id="text_box">
<h2 style="background-image:url([artlist:indexpic])">[artlist:title]</h2>
<div class="text_min">
<!--c:{$row=1 $table=[channel:table $Replace={pre}##] $where=[aid]=[artlist:id] and [cid] =[artlist:cid] $order=[aid] desc}-->
[c:content]
<!--c-->
</div>
<div class="text_link"><a href="[artlist:author]">[artlist:source]</a></div>
</div>
<!--artlist-->
<!--channel-->
复制代码
当前分类下调用文章内容(小类 可分页)
<!--page:{$size=8}-->
<a href="[page:aurl]">[page:title]</a>
<!--artlist:{ $row=1 $table=channel $where=[id]=[page:cid] }-->
<!--c:{$row=1 $table=[artlist:table $Replace={pre}##] $where=[aid]=[page:id] and [cid] =[page:cid] $order=[aid] desc}-->
[c:content]
<!--c-->
<!--artlist-->
<!--page-->
复制代码
欢迎光临 5ucms论坛 (http://bbs.5ucms.com/)
Powered by Discuz! X3.2