导航
当前位置:网站首页 > 站长新闻 > CMS教程 > dedecms标签大全

dedecms标签大全

作者:达特 日期:2023-03-04 分类:CMS教程

 dedecms标签大全,非常经典的织梦dedecms标签,希望对大家制作dedecms网站有帮助.常用的一些dedecms标签,可以用ctrl+F实现搜索dedecms标签。

网站名称:{dede:global.cfg_webname/}

网站根网址:{dede:global.cfg_basehost/}

网站根目录:{dede:global.cfg_cmsurl/}

网页主页链接:{dede:global.cfg_indexurl/}

网站描述:{dede:global.cfg_description/}

网站关键字:{dede:global.cfg_keywords/}

模板路径:{dede:global.cfg_templets_skin/}

调用页面:{dede:include filename="head.htm"/}

网站编码:{dede:global.cfg_soft_lang/}
-----------------------------------------------------------------------------------------------
调用时间:[field:pubdate function=MyDate(http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachy-m-dhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach,@me)/]

调用缩略图:
{dede:arclist row=10 orderby=pubdate type=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachimage.http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach imgwidth=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach定义图片宽度http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach imgheight=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach高度http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach}
[field:image/]
{/dede:arclist}

调用缩略图原图:
[field:litpic runphp=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachyeshttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach]
$youjoys = array("-lp", "_lit");
@me = str_replace ($youjoys, "", @me);
[/field:litpic]

调用单个栏目:
{dede:type}
[field:typename /]
{/dede:type}
-----------------------------------------------------------------------------------------------
文章标题:{dede:field.title/}

文章描述:{dede:field.description function=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachHTML2text(@me)http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach/}

文章关键词:{dede:field.keywords/}

当前位置:{dede:field name=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachpositionhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach/}

文章时间:{dede:field.pubdate function="MyDate(http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachY-m-d H:ihttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach,@me)"/}

文章来源:{dede:field.source/}

文章作者:{dede:field.writer/}

文章内容:{dede:field.body/}

上一篇:{dede:prenext get=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachprehttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach/}

下一篇:{dede:prenext get=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachnexthttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach/}

点击量:
-----------------------------------------------------------------------------------------------
channel|频道标签:

标签名称:channel
标记简介:织梦常用标记,通常用于网站顶部以获取站点栏目信息,方便网站会员分类浏览整站信息
功能说明:用于获取栏目列表
适用范围:全局使用

基本语法:
{dede:channel type=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachtophttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach row=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach8http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach currentstyle="
~typename~
"}
[field:typename/]

{/dede:channel}

参数说明:
typeid = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach0http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 栏目ID
reid = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach0http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 上级栏目ID
row = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach100http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 调用栏目数
col = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach1http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 分多少列显示(默认为单列)
type = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachson | sunhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach son表示下级栏目,self表示同级栏目,top顶级栏目
currentstyle = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 应用样式

底层模板字段:
ID(同 id),typeid, typelink, typename, typeurl,typedir(仅表示栏目的网址)

[field:id/]
[field:typeid/]
[field:typelink/] 调用栏目名称,点击直接跳转该栏目列表
[field:typename/] 调用栏目名称,无链接
[field:typeurl/]
[field:typedir/]

例:
{dede:channel type=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachtophttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach}
[field:typename/]
{/dede:channel}

注:在没有指定typeid的情况下,type标记与模板的环境有关,如,模板生成到栏目一,那么type=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachsonhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach就表示栏目一的所有子类
--------------------------------------------------------------------------------------------
arclist|文档列表:

标签名称:arclist
标记简介:织梦常用标记,也称为自由列表标记,其中imglist、imginfolist、specart、coolart、autolist都是由该标记所定义的不同属性延伸出来的别名标记。
功能说明:获取指定文档列表
适用范围:全局使用

基本语法:
{dede:arclist flag=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach typeid=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach row=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach col=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach titlelen=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach infolen=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach imgwidth=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach imgheight=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach listtype=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach keyword=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach limit=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach0,1http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach}
[field:title/]
{/dede:arclist}

参数说明:
col=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 分多少列显示(默认为单列),5.3版中本属性可以通过多种方式进行多行显示
如果col=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach1http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach要多列显示的可用div+css实现
以下为通过div+css实现多列的示例:

{dede:arclist row=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach10http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach titlelen=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach24http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachpubdatehttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach idlist=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach col=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach2http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach}
?[field:textlink/]([field:pubdate function=MyDate(http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachm-dhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach,@me)/])

{/dede:arclist}
当col>1将使用原来的table多列方式显示
row=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach10http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 返回文档列表总数
typeid=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 栏目ID,在列表模板和档案模板中一般不需要指定,在首页模板中允许用","分开表示多个栏目;
getall=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach1http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 在没有指定这属性的情况下,在栏目页、文章页模板,不会获取以","分开的多个栏目的下级子类
titlelen = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach30http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 标题长度 等同于titlelength
infolen=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach160http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 表示内容简介长度 等同于infolength
imgwidth=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach120http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 缩略图宽度
imgheight=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach90http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 缩略图高度
listtype=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachallhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 栏目类型 image含有缩略图 commend推荐
orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachsortrankhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 文档排序方式
§ orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhothttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 或 orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachclickhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 表示按点击数排列
§ orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachsortrankhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 或 orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachpubdatehttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 按出版时间排列
§ orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachnearhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach
§ orderby==http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachlastposthttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 按最后评论时间
§ orderby==http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachscoreshttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 按得分排序
§ orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachidhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 按文章ID排序
§ orderby=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachrandhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 随机获得指定条件的文档列表
keyword=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 含有指定关键字的文档列表,多个关键字用","分
innertext = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 单条记录样式
aid=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 指定文档ID
idlist =http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 提取特定文档(文档ID)
channelid 频道ID
limit=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach起始ID,记录数http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach (起始ID从0开始)表示限定的记录范围(如:limit=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach1,2http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 表示从ID为1的记录开始,取2条记录)
flag = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 自定义属性值:头条[h]推荐[c]图片[p]幻灯[f]滚动[s]跳转[j]图文[a]加粗[b]
noflag = http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachhttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 同flag,但这里是表示不包含这些属性
orderway=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachdeschttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 值为 desc 或 asc ,指定排序方式是降序还是顺向排序,默认为降序
subday=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach天数http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach 表示在多少天以内的文档


用arclist调用于附加表字段的方法:

要获取附加表内容,必须符合两个条件
1、指定 channelid 属性
2、指定要获得的字段 addfields=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach字段1,字段http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach
如:
{dede:arclist addfields=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachfiletype,language,softtypehttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach row=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach8http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach channelid=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach3http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach}
[field:textlink /] - [field:softtype /]

{/dede:arclist}

底层模板字段:
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 = title
typelink = typename
imglink =
image = ’titile’
字段调用方法:[field:varname/]
如:
{dede:arclist infolen=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach100http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach}
[field:textlink/]


[field:infos/]


{/dede:arclist}
注:底层模板里的Field实现也是织梦标记的一种形式,因此支持使用PHP语法,Function扩展等功能。
如: 给当天发布的内容加上 (new) 标志
[field:senddate runphp=http://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attachyeshttp://www.*****.com/data/attachment/portal/201703/14/101819r18lmp4rh60ett6z.attach]
$ntime = time();
$oneday = 3600 * 24;
if(($ntime - @me)<$oneday) @me = "(new)";
else @me = "";
[/field:senddate]

查看更多 dedecms教程 织梦模板

猜你还喜欢