魔幻精灵

文章 分类 评论
275 7 14

站点介绍

魔幻精灵网

CSCMSv4模板标签详细调用说明sort:排序随机为rand

魔幻精灵 2019-05-09 2343 0条评论 网站知识

首页 / 正文

v4后台可以在线生成标签调用

http://www.chshcms.com/help/show/1688.html


下面是V4的基础标签生成方法

  1.  

  2. {cscms:标示 table="数据表名称" field="需要显示的字段" loop="20" order="desc"}

  3. 当前循环序号:[标示:i](从1开始)

  4. 字段调用方式:[标示:字段名称]

  5. {/cscms:标示}

复制代码

复制代码


标示:为小写字母或者数字;
数据表名称:也就是需要调用的数据表(不包含表前缀);
需要显示的字段:数据表字段名称;
loop:调用数量,分页用pagesize;
start:数据起始位置,缺省值为1 
sort:排序方式,随机为rand, 缺省值为id;
order:正/反 asc desc缺省值为desc;
字段名称="auto" :显示当前分类数据(需要板块的支持)

---------------下面为最新20首歌曲实例--------------

  1.  

  2. {cscms:dance table="dance" field="id,name" loop="20" order="desc"}

  3. <a href="[dance:url zdy=dance,id,play,id]">[dance:i].[dance:name]</a>

  4. {/cscms:dance}

复制代码

复制代码


---------------下面为一级嵌套二级案列--------------
  1.  

  2. {cscms:class table="dance_list" field="id,name" fid="0" sort="xid"order="desc"}

  3. <br><a href="[class:url zdy=dance,id,lists,id]">[class:i].[class:name]</a><br><br>

  4. {cscmstype:dance2 table="dance" field="id,name" cid="auto" loop="20"order="desc"}

  5. -------<a href="[dance2:url zdy=dance,id,play,id]">[dance2:i].[dance2:name]</a><br>

  6. {/cscmstype:dance2}

  7. {/cscms:class}

复制代码

复制代码


//下面是些基础全局标签
  1.  

  2. ---------------------------------------------

  3. {cscms:indexhead} 主站的头部

  4. {cscms:indexleft} 主站的左部

  5. {cscms:indexright} 主站的右部

  6. {cscms:indexbottom} 主站的下部

  7. {cscms:indextempurl} 主站模板目录

  8. ---------------------------------------------

  9. {cscms:head} 头部

  10. {cscms:left} 左部

  11. {cscms:right} 右部

  12. {cscms:bottom} 下部

  13. {cscms:tempurl} 当前模板目录

  14. {cscms:webname} 站点名称

  15. {cscms:weburl} 站点域名,不带 http://

  16. {cscms:path} 站点地址,带 http://

  17. {cscms:stat} 统计代码

  18. {cscms:notice} 站点公告

  19. {cscms:regxy} 注册协议

  20. {cscms:title} 全局SEO标题

  21. {cscms:keywords} 全局SEO关键词

  22. {cscms:description} 全局SEO介绍

  23. {cscms:mail} 管路员邮箱

  24. {cscms:qq} 管理员QQ

  25. {cscms:tel} 管理员电话

  26. {cscms:icp} 网站备案号

  27. {cscms:login} 判断当前是否登录 已经登录: ok 未登录:no

  28. {cscms:uid} 当前登录的会员ID,未登录显示0

  29. {cscms:logkuang} 全局会员登陆框,调用模板 ulogin.html uinfo.html

复制代码

复制代码


//全局部分链接标签
  1.  

  2. {cscms:gbooklink} 网站留言

  3. {cscms:solink} 搜索链接

  4. {cscms:codes} 验证码地址

  5. {cscms:userlink} 会员版块

  6. {cscms:loginlink} 会员登录

  7. {cscms:reglink} 会员注册

  8. {cscms:passlink} 密码找回

  9. {cscms:qqlink} QQ登录

  10. {cscms:weibolink} 微博登录

  11. {cscms:kaixinlink} 开心账号登录

  12. {cscms:baidulink} 百度账号登录

  13. {cscms:doubanlink} 豆瓣账号登录

  14. {cscms:renrenlink} 人人账号登录

复制代码

复制代码


//下面是内部字段自定义标签
  1.  

  2. 格式化时间:[标示:addtime style=Y-m-d H:i:s] 可以多个或者单个,=time 显示 XX小时前

  3. 获取当前IP地理位置:[标示:ip style=city]

  4. 图片地址:[标示:pic dir=版块目录],版块目录为上传调用目录,比如歌曲图片:[dance:pic dir=dance]

  5. 字符截取:[标示:name len=10],len=显示数量

复制代码

复制代码


//下面是外部字段自定义标签
  1.  

  2. IP地理位置:[标示:addres zd=ip],ip为存储IP记录的字段名

  3. 数据统计:[标示:count zdy=数据表,要查询的字段,当前字段],如查询当前会员的歌曲数量:[user:count zdy=dance,uid,id]

  4. 会员信息:[标示:user zd=要查询的字段名],如查询会员QQ,[dance:user zd=qq],版块必须包含字段uid或者uidb,uida

  5. 会员等级:[标示:user level=1],1星星数,2下个级别需要经验,3下个级别剩余经验,4剩余百分比,5等级名称

  6. 歌手信息:[标示:singer zd=字段名],如歌手名称:[dance:singer zd=name],版块数据表字段必须包含singerid

复制代码

复制代码


//下面是自定义链接
  1.  

  2. 版块链接:[标示:murl]

  3. 网站链接:[标示:url link=类别,排序方式],如歌曲播放链接:[dance:url link=play,id],只能在当前版块调用

  4. 会员主页:[标示:url ulink=控制器,方法],如会员主页:[dance:url ulink=index]

  5. 会员中心:[标示:url userlink=控制器,方法],如修改资料 [user:url userlink=edit]

  6. 自定义URL:[标示:url zdy=版块,调用字段,控制器,方法],如在主页调用歌曲版块的播放地址:[dance:url zdy=dance,id,play,id]

复制代码

复制代码


//-------------PHP标签-----------
  1.  

  2. {cscmsphp}

  3. //.....php代码.......

  4. {/cscmsphp}

复制代码

复制代码


//--------------if判断--------------
  1.  

  2. {if:条件==条件}

  3. .....

  4. {else}

  5. .....

  6. {end if}

复制代码

复制代码


//-----------JS动态调用统计标签-----------
  1.  

  2. {cscmscount param="数据表|要查询的字段=内容|要查询的字段=内容|..."}

  3. 比如查询当前在线会员:{cscmscount param="user|zx=1"}

复制代码

复制代码


//-----------会员主页模板列表-------------
  1.  

  2. {cscmsweb}

  3. [web:pic] 模板图片地址

  4. [web:name] 模板名称

  5. [web:dir] 模板目录

  6. [web:path] 模板路径

  7. [web:vip] 需要会员组ID

  8. [web:level] 需要等级ID

  9. [web:cion] 需要金币

  10. {/cscmsweb}

复制代码

复制代码


//------------一级嵌套二级------------------
  1.  

  2. {cscms:标示 table="数据表名称" field="需要显示的字段" loop="20" order="desc"}

  3. 当前循环序号:[标示:i](从1开始)

  4. 字段调用方式:[标示:字段名称]

  5. {cscmstype:标示2 table="数据表名称" field="需要显示的字段" 条件="内容" loop="20"order="desc"}

  6. 当前循环序号:[标示2:i](从1开始)

  7. 字段调用方式:[标示2:字段名称]

  8. {/cscmstype:标示2}

  9. {/cscms:标示}

复制代码

复制代码


//---------------字母调用方法-----------
  1.  

  2. {cscmszm:27}

  3. [zm:name] 字母

  4. {/cscmszm}

复制代码

复制代码


//--------------------自定义标签--------------
  1.  

  2. 自定义标签:{cscmsself:标示} 标示为后台新增

  3. 自定义JS标签解析: {cscmsjs:标示} 标示为后台新增

  4. 自定义页面标签解析: {cscmspage:标示} 标示为后台新增

复制代码

复制代码


//--------------自定义模板文件标签----------------
  1.  

  2. {cscms:opt-文件表示}

  3. 如:{cscms:opt-hits} 那么就是调用的当前模板目录的 opt-hits.html文件

复制代码

复制代码


//------------解析会员中心版块链接导航------------
  1. {cscmsmenu:user}

  2. [menu:name] 版块名称

  3. [menu:dir] 版块目录

  4. {cscmsmenu:auto}

  5. [menu:i] 排序重1开始

  6. [menu:link] 链接地址

  7. [menu:name] 链接名称

  8. {/cscmsmenu:auto}

  9. {/cscmsmenu}

复制代码

复制代码


//-------------全局分页标签---------------
  1.  

  2. {cscms:pagenow} 当前页码(从1开始)

  3. {cscms:pagecout} 总页数

  4. {cscms:pagedata} 总数量

  5. {cscms:pagesize} 每页显示多少条记录

  6. {cscms:pageup} 上一页连接

  7. {cscms:pagedown} 下一页连接

  8. {cscms:pagefirst} 首页连接

  9. {cscms:pagelast} 尾页连接

  10. {cscms:pagelist} 翻页标签

  11. {cscms:pagenum len=8} 显示页数,当前页CSS元素为 on

评论(0)

最新评论

  • tam compact

    My partner and I absolutely love your blog and find many of your post's to be exactly I'm looking for. Would you offer guest writers to write content available for you? I wouldn't mind writing a post or elaborating on a lot of the subjects you write about here. Again, awesome site!

  • ae888

    Excellent beat ! I would like to apprentice while you amend your website, how could i subscribe for a blog website? The account aided me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear concept

  • mbee.com.vn

    Simply want to say your article is as astounding. The clarity in your post is just cool and i can assume you're an expert on this subject. Fine with your permission let me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please keep up the enjoyable work.

  • Life insurance

    Hi there, You've done a fantastic job. I will certainly digg it and personally suggest to my friends. I am confident they'll be benefited from this web site.

  • vách vệ sinh

    You've made some good points there. I looked on the web to find out more about the issue and found most people will go along with your views on this site.

  • tam compact

    Hi, I do think this is an excellent web site. I stumbledupon it ;) I am going to revisit once again since i have saved as a favorite it. Money and freedom is the best way to change, may you be rich and continue to help others.

  • PG เว็บตรงไม่ผ่านเอเย่นต์

    เดิมพันบาคาร่ามันที่สล็อต666เล่นคาสิโน 777เดิมพันออนไลน์ทดลอง เล่น สล็อต pgสล็อต เครดิตฟรจัดคาสิโนออนไลน์777แทงpgสล็อตวัดใจสล็อต ออนไลน์จัดสล็อต เว็บตรง แตก ง่ายวัดใจสล็อต เว็บ ตรง แตก ง่ายวัดใจสล็อต pg เว็บ ตรงเดิมพันу9สล็อตเทรดซุปเปอร์ สล็อต 666เดิมพันบาคาร่า ออนไลน์ ufa99เดิมพันสล็อตxo168จัดสล็อต ออนไลน์ sabai55แทงสล็อต 68วัดดวงสล็อต ฝาก20รับ100 เว็บตรงวัดใจสล็อต เว็บแท้วัดโคตรเทพnoname auto สล็อตเดิมพันออนไลน์โหลด สล็อต666วัดmgw สล็อต

  • Charlene

    Simply wish to say your article is as surprising. The clarity in your post is just cool and i can assume you are an expert on this subject. Fine with your permission allow me to grab your feed to keep up to date with forthcoming post. Thanks a million and please carry on the gratifying work.

  • đăng nhập ae888

    There's certainly a lot to know about this topic. I love all of the points you made.

  • dp595.com

    Great blog you've got here.. It's difficult to find quality writing like yours these days. I really appreciate individuals like you! Take care!!

日历

2024年12月

1234567
891011121314
15161718192021
22232425262728
293031    

标签云

文章目录

推荐关键字:

配色方案