zoukankan      html  css  js  c++  java
  • 5ucms进阶

    5ucms的特殊列表调用使用技巧
    
      光知道一些5ucms常用的循环列表标签是不行的,因为网站复杂多变,如果不知道几个特殊使用的技巧,那我们如何做出更强大更完美的站点,所以为了这个我也是费了很多精力才整理出来的一些特殊列表循环标签,希望能够帮助您解决一些解决不了的问题
      
      
      
      
      
      
      
      让推荐文章不在列表里面出现
      <!--page:{$size=6}-->
      {if:[page:commend]=0}
      <divclass="llist">
      <ahref="[page:aurl]"><imgsrc="[page:indexpic$width=70$height=30]"width="70"height="30"border="0"/></a>
      </div>
      {endif}
      <!--page-->
      在栏目页和内容页调用当前栏目的兄弟栏目
      <!--Father:{$Table=Channel$Where=[ID]={Field:CID}$Field=[FatherID]}-->
      <!--Child:{$Table=Channel$Where=[FatherID]=[Father:FatherID]$Field=[ID],[Name]}-->
      <ahref=[Child:curl]>[Child:name]</a>
      <!--Child-->
      <!--Father-->
      判断标签:
      {if:len("[page:indexpic]")>0}
      <imgstyle="margin-left:5px;"align="right"src="[page:indexpic$width=80$height=76]"width=80height=76/>
      {else}
      <imgstyle="margin-left:5px;"align="right"src="nopic.gif"width=80height=76/>
      {endif}
      当前栏目高亮显示
      
      获取指定大栏目下子栏目的文章
      
      <!--Channel:{$Table=Channel$Where=id=3}-->
      <!--List:{$Row=10$Cid=[Channel:childid]}-->
      [List:titlex]<br/>
      <!--List-->
      <!--Channel-->
      调用七天内的热门文章
      
      <!--List:{$Table=Content$Where=datediff('d',createtime,now())<=7$Order=[views]Desc}-->
      <ahref="[list:aurl]"target="blank">[List:titlex]</a>list:createtime]</br>
      <!--List-->
      
      调用组图:
      <!--List:{$Row=99$Table=upload$Where=([ext]="jpg"or[ext]="gif"or[ext]="bmp"or[ext]="png")andaid={field:id}}-->
      <li>[list:i]<ahref="[list:dir]"><imgborder="0"src="[list:dir]"/></a></li>
      <!--List-->
      
      5UCMS内容页调用同一作者、来源、权重文章
      
      <!--order:{$row=1$Table=Content$Where=[id]='{field:id}'}-->
      <!--List:{$Row=10$Table=Content$Where=[Author]=[order:Author]$Order=[ID]Desc}-->
      <ahref="[List:aurl]">[List:titlex]</a><br>
      <!--List-->
      <!--order-->
      作者:$Where=[Author]='[order:Author]'
      来源:$Where=[source]='[order:source]'
      权重:$Where=[order]=[order:order]
      按作者调用列表:{if:"[page:Author]"="admin"}
      调用多个ID栏目,并排除隐藏文章,排除多个ID的文章,只调用有图片的,并随机排序
      <!--Pic:{$Row=3$Sql=select*from[{pre}Content]where[cid]in(3,4,5)and[id]notin(8,9,10,14,16,20)and[Display]=1Orderbyright(cstr(Rnd(-int([ID]+rnd(-timer())*100)))*1000*Now(),2)$Type=Images}--><li><ahref="[Pic:aurl]"onmouseover="Tip('<imgsrc=[Pic:indexpic]class=tip_a>')"onmouseout="UnTip()"><imgsrc="[Pic:indexpic$width=100$height=44]"/><pclass="title">[Pic:titlex]</p><pclass="time">[pic:createtime$format=yyyy-mm-dd]</p></a></li>
      <!--Pic-->
      
    

      

  • 相关阅读:
    第1年4月22日 IBInspectable巧妙用法 cornerRadius
    第1年4月15日
    第1年4月9日 Domain: com.apple.dt.MobileDeviceErrorDomain
    第1年4月7日 活体检测
    GPS 波段信号范围
    tomcat远程调试
    JdbcTemplate或hibernate动态建表
    jdk动态代理失效,事务自调用失效
    Tomcat 访问静态资源出现中文乱码解决办法(转)
    SQL Server 查看死锁进程(转)
  • 原文地址:https://www.cnblogs.com/zgzy/p/3015335.html
Copyright © 2011-2022 走看看