织梦标签调用大全文档格式.docx
《织梦标签调用大全文档格式.docx》由会员分享,可在线阅读,更多相关《织梦标签调用大全文档格式.docx(8页珍藏版)》请在冰点文库上搜索。
arclistrow=10orderby=pubdatetype='
image.'
imgwidth='
定义图片宽度'
imgheight='
高度'
}
image/]
{/dede:
arclist}
调用缩略图原图:
litpicrunphp='
yes'
]
$youjoys=array("
-lp"
"
_lit"
);
@me=str_replace($youjoys,"
"
@me);
[/field:
litpic]
调用单个栏目:
type}
<
ahref="
typelink/]"
>
typename/]<
/a>
文章标题:
field.title/}
文章描述:
field.descriptionfunction='
html2text(@me)'
文章关键词:
field.keywords/}
当前位置:
fieldname='
position'
文章时间:
field.pubdatefunction="
MyDate('
Y-m-dH:
i'
@me)"
文章来源:
field.source/}
文章作者:
文章内容:
field.body/}{dede:
field.writer/}
上一篇:
prenextget='
pre'
下一篇:
next'
/}
点击量:
scriptsrc="
phpurl'
/}/count.php?
view=yes&
aid={dede:
id'
/}&
mid={dede:
mid'
/}"
type='
text/javascript'
language="
javascript"
/script>
channel|频道标签:
标签名称:
channel
标记简介:
织梦常用标记,通常用于网站顶部以获取站点栏目信息,方便网站会员分类浏览整站信息
功能说明:
用于获取栏目列表
适用范围:
全局使用
基本语法:
channeltype='
top'
row='
8'
currentstyle="
li>
ahref='
~typelink~'
class='
thisclass'
~typename~<
<
/li>
typelink/]'
typename/]<
channel}
参数说明:
typeid='
0'
栏目ID
reid='
上级栏目ID
row='
100'
调用栏目数
col='
1'
分多少列显示(默认为单列)
type='
son|sun'
son表示下级栏目,self表示同级栏目,top顶级栏目
currentstyle='
'
应用样式
底层模板字段:
ID(同id),typeid,typelink,typename,typeurl,typedir(仅表示栏目的网址)
id/]
typeid/]
typelink/]调用栏目名称,点击直接跳转该栏目列表
typename/]调用栏目名称,无链接
typeurl/]
typedir/]
例:
typelink/]'
注:
在没有指定typeid的情况下,type标记与模板的环境有关,如,模板生成到栏目一,那么type='
son'
就表示栏目一的所有子类
--------------------------------------------------------------------------------------------
arclist|文档列表:
arclist
织梦常用标记,也称为自由列表标记,其中imglist、imginfolist、specart、coolart、autolist都是由该标记所定义的不同属性延伸出来的别名标记。
获取指定文档列表
arclist
flag='
h'
typeid='
col='
titlelen='
infolen='
listtype='
orderby='
keyword='
limit='
0,1'
arcurl/]'
title/]<
col='
分多少列显示(默认为单列),5.3版中本属性可以通过多种方式进行多行显示
如果col='
要多列显示的可用div+css实现
以下为通过div+css实现多列的示例:
styletype=text/css>
div{width:
400px;
float:
left;
/style>
arclistrow='
10'
24'
pubdate'
idlist='
2'
?
textlink/]([field:
m-d'
@me)/])<
br/>
当col>
1将使用原来的table多列方式显示
row='
返回文档列表总数
typeid='
栏目ID,在列表模板和档案模板中一般不需要指定,在首页模板中允许用"
"
分开表示多个栏目;
getall='
在没有指定这属性的情况下,在栏目页、文章页模板,不会获取以"
分开的多个栏目的下级子类
titlelen='
30'
标题长度等同于titlelength
infolen='
160'
表示内容简介长度等同于infolength
imgwidth='
120'
缩略图宽度
imgheight='
90'
缩略图高度
listtype='
all'
栏目类型image含有缩略图commend推荐
orderby='
sortrank'
文档排序方式
§
hot'
或orderby='
click'
表示按点击数排列
按出版时间排列
near'
orderby=='
lastpost'
按最后评论时间
scores'
按得分排序
按文章ID排序
rand'
随机获得指定条件的文档列表
keyword='
含有指定关键字的文档列表,多个关键字用"
分
innertext='
单条记录样式
aid='
指定文档ID
idlist='
提取特定文档(文档ID)
channelid频道ID
limit='
起始ID,记录数'
(起始ID从0开始)表示限定的记录范围(如:
1,2'
表示从ID为1的记录开始,取2条记录)
flag='
自定义属性值:
头条[h]推荐[c]图片[p]幻灯[f]滚动[s]跳转[j]图文[a]加粗[b]
noflag='
同flag,但这里是表示不包含这些属性
orderway='
desc'
值为desc或asc,指定排序方式是降序还是顺向排序,默认为降序
subday='
天数'
表示在多少天以内的文档
用arclist调用于附加表字段的方法:
要获取附加表内容,必须符合两个条件
1、指定channelid属性
2、指定要获得的字段addfields='
字段1,字段'
如:
arclistaddfields='
filetype,language,softtype'
channelid='
3'
textlink/]-[field:
softtype/]<
br/>
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=<
arcurl'
title<
typelink=<
typeurl'
typename<
imglink=<
imgsrc='
picname'
border='
width='
imgwidth'
height='
imgheight'
image=<
alt=’titile’>
字段调用方法:
varname/]
arclistinfolen='
textlink/]
br>
infos/]
底层模板里的Field实现也是织梦标记的一种形式,因此支持使用PHP语法,Function扩展等功能。
给当天发布的内容加上(new)标志
senddaterunphp='
$ntime=time();
$oneday=3600*24;
if(($ntime-@me)<
$oneday)@me="
fontcolor='
red'
(new)<
/font>
;
else@me="
senddate]