搜索
首页CMS教程DEDECMSdedecms的全局标签有哪些

dedecms的全局标签有哪些

Jul 12, 2019 pm 04:01 PM

dedecms的全局标签有哪些

dedecms全局标签:

channel |频道标签, 功能:用于获取栏目列表(全局使用)

基本语法:

{dede:channel type='top' row='8'}
<a href=&#39;&#39;[field:typelink/]"> [field:typename/] </a>
{/dede:channel}

row = '1'分多少列显示(默认为单列)

type = 'son | sun' son表示下级栏目,self表示同级栏目,top顶级栏目

field|常用变量,功能:用于获取特定栏目或者档案的字段值及常用的环境变量值(全局使用)

基本语法:

{dede:field name=&#39;字段名&#39;/}

arclist|文档列表,功能:获取指定文档列表(全局使用)

基本语法:

{dede:arclist flag=&#39;h&#39; typeid=&#39;&#39; row=&#39;&#39; col=&#39;&#39; titlelen=&#39;&#39; infolen=&#39;&#39; imgwidth=&#39;&#39; imgheight=&#39;&#39; listtype=&#39;&#39; orderby=&#39;&#39; keyword=&#39;&#39; limit=&#39;0,1&#39;}} 
<a href="[field:arcurl/]">[field:title/]</a>
{/dede:arclist}

row='10' 返回文档列表总数

typeid='' 栏目ID,在列表模板和档案模板中一般不需要指定,在首页模板中允许用","分开表示多个栏目;

getall='1' 在没有指定这属性的情况下,在栏目页、文章页模板,不会获取以","分开的多个栏目的下级子类

titlelen = '30' 标题长度 等同于titlelength

infolen='160' 表示内容简介长度 等同于infolength

imgwidth='120' 缩略图宽度

imgheight='90' 缩略图高度

listtype='all' 栏目类型 image含有缩略图 commend推荐

orderby='sortrank' 文档排序方式

§ orderby='hot' 或 orderby='click' 表示按点击数排列

§ orderby='sortrank' 或 orderby='pubdate' 按出版时间排列

§ orderby='near'

§ orderby=='lastpost' 按最后评论时间

§ orderby=='scores' 按得分排序

§ orderby='id' 按文章ID排序

§ orderby='rand' 随机获得指定条件的文档列表

keyword='' 含有指定关键字的文档列表,多个关键字用","分

底层模板字段:

ID(同 id),typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,
source,litpic(同picname),pubdate,senddate,mid, lastpost,scores,goodpost,badpost,notpost,
description(同infos),filename, image, imglink, fulltitle, textlink, typelink,plusurl, memberurl, templeturl,
stime(pubdate 的"0000-00-00"格式)

其中:

textlink = <a href=&#39;arcurl&#39;>title</a>
typelink = <a href=&#39;typeurl&#39;>typename</a>
imglink = <a href=&#39;arcurl&#39;><img src=&#39;picname&#39; border=&#39;0&#39; width=&#39;imgwidth&#39; height=&#39;imgheight&#39;></a>
image = <img src=&#39;picname&#39; border=&#39;0&#39; width=&#39;imgwidth&#39; height=&#39;imgheight&#39; alt=’titile’>

字段调用方法:[field:varname/]

如:

{dede:arclist infolen=&#39;100&#39;}
[field:textlink/]
<br>
[field:infos/]
<br>
{/dede:arclist}

更多DedeCMS相关技术文章,请访问DedeCMS教程栏目进行学习!

以上是dedecms的全局标签有哪些的详细内容。更多信息请关注PHP中文网其他相关文章!

声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热工具

MinGW - 适用于 Windows 的极简 GNU

MinGW - 适用于 Windows 的极简 GNU

这个项目正在迁移到osdn.net/projects/mingw的过程中,你可以继续在那里关注我们。MinGW:GNU编译器集合(GCC)的本地Windows移植版本,可自由分发的导入库和用于构建本地Windows应用程序的头文件;包括对MSVC运行时的扩展,以支持C99功能。MinGW的所有软件都可以在64位Windows平台上运行。

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

EditPlus 中文破解版

EditPlus 中文破解版

体积小,语法高亮,不支持代码提示功能

Atom编辑器mac版下载

Atom编辑器mac版下载

最流行的的开源编辑器

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境