对SiteServer CMS标签实用小结


1.   显示内容列表序号:{content.ItemIndex}    栏目列表序号:{channel.ItemIndex}
 
2.   <stl:contents where=“zbsj like '%'+cast(DATEPART(mm,date) as varchar(10))+’-‘+cast(DATEPART(dd,date) as         varchar(10))" isDynamic="true" >
 
3.         yyyy-mm-dd HH:MM 24小时制
 
4.         STL 地址通配符:使用通配符(“~”)来表示应用程序的根目录,使用通配符(“@”)来表示当前站点的域名地址
 
5.        判断当前栏目名称是否为"栏目1"或"栏目2"
           当前栏目不是栏目1或栏目2
           <stl:if testType="ChannelName"testOperate="In"testValue="栏目1,栏目2">
 
           <stl:successTemplate><p>当前栏目是栏目1或栏目2</p></stl:successTemplate>
 
           <stl:failureTemplate><p>当前栏目不是栏目1或栏目2</p></stl:failureTemplate>
 
           </stl:if>
 
6.        使用实体标签{Channel.TItle}在内容列表里显示内容标题所在的栏目
 
7.        调用图片:<stl:content type="imageurl" no="2"></stl:content>
 
8.       统计评论数:<stl:count type="Comments"></stl:count>
          统计栏目数:<stl:count type="Channels"></stl:count>
          统计内容数:<stl:count type="Contents"></stl:count>
          统计下载次数:<stl:count type="Downloads"></stl:count>
 
9.  3.6.5WCM调用栏目虚拟字段使用{Channel.top1.虚拟字段}调用不出来,需要使用STL标签调用
 
10.     调用Logo: <stl:value type="Logo"><img src="{Content.ImageUrl}" width="168" height="82"></stl:value>
 
11.   显示当前日期:<stl:value type="Date"></stl:value>

12.
<stl:each type="photo" isImage="true">
                <li>
                  <p><stl:photo type="description"></stl:photo></p>
                  <stl:photo type="MiddleUrl"></stl:photo>
                </li>
              </stl:each>
 
13.  统计下载量
      <stl:sqlContents connectionStringName="ConnectionString">
      <stl:queryString>
      select sum(countnum) as xzl from bairong_Count where CountType='download'
      </stl:queryString>
      {sql.xzl}
      </stl:sqlContents>
 
14.  整网下载量。
           <stl:sqlContents connectionStringName="ConnectionString" isDynamic="true"> <stl:queryString> select sum(countnum) as xzl from bairong_Count where                  CountType='download' </stl:queryString>{sql.xzl}</stl:sqlContents>
 
15.  判断是否是当前时间,testValue="now"
 
16.  t打头的是缩略图,不带t的是原图,不勾选缩略图默认使用的是原图。
 
17.  多字段排序:order by="isTop,AddDate"
 

18.  调用添加者:{Content.AddUserName}
注:本文转载自拾图网[http://www.tshinet.com],转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如有侵权行为,请联系我们,我们会及时删除。
上一篇 下一篇

淘宝热销

  • Mistine小黄帽防晒霜乳SPF50泰版面部防紫外线隔离男女军训蜜丝婷

    【推荐理由】赠运费险

    【优惠券】20   【券后价】59.00

    【下单链接】18¥ CZ0001 G5fHdEqOsnB¥

    >>>>>> 马上打开

  • G7旗舰店越南进口美式纯黑咖啡粉速溶无糖0脂减燃正品学生提神

    【推荐理由】库存紧张,好评过万

    【优惠券】3    【券后价】26.90

    【下单链接】27¥ CZ0001 zb0bdEqLV7G¥

    >>>>>> 马上打开