5ucms论坛

标题: 5ucms 大分类下调用列表标签例子 [打印本页]

作者: admin    时间: 2019-2-26 10:04
标题: 5ucms 大分类下调用列表标签例子
固定大类下所有子类内容(不包含子栏目名),如ID=4时



固定大类下所有子类内容(包含子栏目名),如ID=4时



非固定大类下的所有内容

  1. <!--menu:{ $Row=99 $table=Channel $Where=[order]>500 $order=[order] asc}-->
  2.                 <tr {if:[menu:i] mod 2=0}xxxxxx{end if}>
  3.                 <a href="[menu:curl]" target="_blank">[menu:cname]</a>
  4.           <!--list:{ $row=7 $Sql=select * from [{pre}Content] where [cid] in ([menu:ChildIDs]) Order by [order]desc,[id]desc}-->
  5.                         <a href="[List:aurl]" target="_blank">[List:titlex]</a>  
  6.           <!--List-->        
  7. <!--menu-->
复制代码


固定大类,调用子类 二级

  1. <!--Main:{ $Table=Channel $Where=[FatherID]=7 $order=[order] desc,[id] desc }-->
  2. <a href="[Main:curl]" target="_blank" title="[Main:cname]">[Main:cname]</a>
  3. <!--Main-->
复制代码


固定大类,调用子类 二级 三级 栏目名称

  1. <!--channel:{ $row=10 $table=channel $where=[fatherid]=0 and  [id] not in (1,2,4,10) and [order]>0  $Order=[order] desc,[ID] Desc  }-->
  2. <A href="[channel:curl]" target=_self>[channel:cname]</A></DIV>

  3. <!--Main:{ $Table=Channel $Where=[FatherID]=[channel:id] $Order=[order] asc,[ID] Desc  }-->
  4. <a href="[Main:curl]">[Main:name]</a>
  5. <!--Main-->

  6. <!--channel-->
复制代码


固定大类,调用三级内容

  1. <!--channel:{ $Table=Channel $Where=[FatherID]=5 and [order]>10 }-->  
  2. <a title="[channel:cname]" target="_blank" href="[channel:curl]">[channel:cname]</a>
  3. <!--Father:{$Table=Channel $Where=[ID] IN ([channel:ChildIDs]) and [DeepPath]=2}-->
  4. <!--list:{ $row=10 $mode=uncommend $cid=[Father:childids] $order=[order] desc,[id] desc }-->
  5. <A href="[List:aurl]" title="[List:title]">[List:titlex]</A></LI>
  6. <!--List-->
  7. <!--Father-->
  8. <!--channel-->
复制代码


当前分类下调用文章内容(大类)

  1. <!--channel:{ $row=1 $table=channel $where=id in({field:childid}) $field=table,cid,id,childid,childids}-->
  2. <div class="node">
  3. <div class="title"><a href="[channel:curl]">[channel:cname]</a></div>
  4. <div class="box">
  5. <ul>
  6. <!--artlist:{ $row=1 $table=Content $where=[cid]=[channel:childids] }-->
  7. <li><a href="[artlist:aurl]">[artlist:title]</a></li>
  8. <p><!--c:{$row=1 $table=[channel:table $Replace={pre}##] $where=[aid]=[artlist:id] and [cid] =[artlist:cid] $order=[aid] desc}-->
  9. [c:content]
  10. <!--c-->
  11. </p>
  12. <!--artlist-->
  13. </ul>
  14. </div>
  15. </div>
  16. <!--channel-->
复制代码


当前分类下调用文章内容(小类 不可分页)

  1. <!--channel:{ $row=1 $table=channel $where=[cid] = {field:id}}-->   
  2. <!--artlist:{ $row=999 $table=Content $where=[cid]=[channel:childids] }-->   
  3. <div id="text_box">
  4.   <h2 style="background-image:url([artlist:indexpic])">[artlist:title]</h2>
  5.   <div class="text_min">
  6. <!--c:{$row=1 $table=[channel:table $Replace={pre}##] $where=[aid]=[artlist:id] and [cid] =[artlist:cid] $order=[aid] desc}-->   
  7. [c:content]   
  8. <!--c-->  
  9.   </div>
  10.   <div class="text_link"><a href="[artlist:author]">[artlist:source]</a></div>
  11. </div>
  12. <!--artlist-->
  13. <!--channel-->
复制代码


当前分类下调用文章内容(小类 可分页)

  1. <!--page:{$size=8}-->

  2. <a href="[page:aurl]">[page:title]</a>

  3. <!--artlist:{ $row=1 $table=channel $where=[id]=[page:cid] }-->                                 
  4. <!--c:{$row=1 $table=[artlist:table $Replace={pre}##] $where=[aid]=[page:id] and [cid] =[page:cid] $order=[aid] desc}-->   
  5. [c:content]   
  6. <!--c-->  
  7. <!--artlist-->
  8. <!--page-->
复制代码





欢迎光临 5ucms论坛 (http://bbs.5ucms.com/) Powered by Discuz! X3.2