# 织梦标签大全
- 全局标签
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>global<span class="token2">.</span>cfg_basehost <span class="token">/</span><span class="token2">}</span> 主机网址
<span class="token2">{</span>dede<span class="token2">:</span>global<span class="token2">.</span>cfg_webname<span class="token">/</span><span class="token2">}</span> 网站名称
<span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>typename<span class="token">/</span><span class="token2">}</span> 栏目名称
<span class="token"><</span>title<span class="token">></span><span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>typename<span class="token">/</span><span class="token2">}</span> _ <span class="token2">{</span>dede<span class="token2">:</span>global<span class="token2">.</span>cfg_webname<span class="token">/</span><span class="token2">}</span><span class="token"><</span><span class="token">/</span>title<span class="token">></span>
<span class="token"><</span>meta name<span class="token">=</span><span class="token4">"description"</span> content<span class="token">=</span><span class="token4">"{dede:global.cfg_description/}"</span> <span class="token">/</span><span class="token">></span>
<span class="token"><</span>meta name<span class="token">=</span><span class="token4">"keywords"</span> content<span class="token">=</span><span class="token4">"{dede:global.cfg_keywords/}"</span> <span class="token">/</span><span class="token">></span>
<span class="token"><</span>title<span class="token">></span> <span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>title<span class="token">/</span><span class="token2">}</span> _ <span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>typename<span class="token">/</span><span class="token2">}</span> _ <span class="token2">{</span>dede<span class="token2">:</span>global<span class="token2">.</span>cfg_webname<span class="token">/</span><span class="token2">}</span><span class="token"><</span><span class="token">/</span>title<span class="token">></span>
<span class="token"><</span>meta name<span class="token">=</span><span class="token4">"description"</span> content<span class="token">=</span><span class="token4">"{dede:global.cfg_description/}"</span> <span class="token">/</span><span class="token">></span>
<span class="token"><</span>meta name<span class="token">=</span><span class="token4">"keywords"</span> content<span class="token">=</span><span class="token4">"{dede:global.cfg_keywords/}"</span> <span class="token">/</span><span class="token">></span>
$GLOBALS<span class="token2">[</span><span class="token4">'_sys_globals'</span><span class="token2">]</span><span class="token2">[</span><span class="token4">'curfile'</span><span class="token2">]</span><span class="token">=</span>partview<span class="token2">;</span>首页<span class="token">/</span>list列表页<span class="token">/</span>archives文章页
文章对象 $GLOBALS<span class="token2">[</span><span class="token4">'arc'</span><span class="token2">]</span><span class="token">-</span><span class="token">></span>Fields
分类 $GLOBALS<span class="token2">[</span><span class="token4">'_sys_globals'</span><span class="token2">]</span><span class="token2">[</span><span class="token4">'typename'</span><span class="token2">]</span>
<span class="token2">[</span>field<span class="token2">:</span>global runphp<span class="token">=</span><span class="token4">'yes'</span> name<span class="token">=</span>autoindex<span class="token2">]</span>@me<span class="token">=</span>@me<span class="token">+</span><span class="token3">1</span><span class="token2">;</span><span class="token2">[</span><span class="token">/</span>field<span class="token2">:</span>global<span class="token2">]</span>
<span class="token2">{</span>dede<span class="token2">:</span>include filename<span class="token">=</span><span class="token4">"head.htm"</span><span class="token">/</span><span class="token2">}</span>调用模板
```
```
- php标签,判断有图无图
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>tagname runphp<span class="token">=</span><span class="token4">'yes'</span><span class="token2">}</span>
@me <span class="token">=</span><span class="token1">dump</span><span class="token2">(</span><span class="token2">[</span><span class="token3">1</span><span class="token2">,</span><span class="token3">2</span><span class="token2">,</span><span class="token3">3</span><span class="token2">]</span><span class="token2">)</span><span class="token2">;</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>tagname<span class="token2">}</span>
<span class="token2">[</span>field<span class="token2">:</span>litpic runphp<span class="token">=</span><span class="token4">"yes"</span><span class="token2">]</span>@me<span class="token">=</span><span class="token1">is_pic</span><span class="token2">(</span>@me<span class="token2">)</span><span class="token2">;</span><span class="token2">[</span><span class="token">/</span>field<span class="token2">:</span>litpic<span class="token2">]</span>
```
```
- 栏目标签
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>channelartlist typeid<span class="token">=</span><span class="token4">'top'</span><span class="token2">}</span>
<span class="token"><</span>li<span class="token">></span>
<span class="token"><</span>a href<span class="token">=</span><span class="token4">"{dede:field name='typeurl'/}"</span><span class="token">></span>
<span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">'typename'</span><span class="token">/</span><span class="token2">}</span>
<span class="token"><</span><span class="token">/</span>a<span class="token">></span>
<span class="token2">{</span>dede<span class="token2">:</span>channel type<span class="token">=</span><span class="token4">'son'</span> noself<span class="token">=</span><span class="token4">'yes'</span> currentstyle<span class="token">=</span><span class="token4">'on'</span> <span class="token2">}</span>
<span class="token"><</span>li class<span class="token">=</span><span class="token4">"{dede:field.currentstyle/}"</span><span class="token">></span><span class="token"><</span>a href<span class="token">=</span><span class="token4">"[field:typeurl/]"</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>typename<span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span><span class="token"><</span><span class="token">/</span>li<span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>channel<span class="token2">}</span>
<span class="token"><</span><span class="token">/</span>li<span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>channelartlist<span class="token2">}</span>
单独调用
<span class="token2">{</span>dede<span class="token2">:</span>channel type<span class="token">=</span><span class="token4">'top'</span> currentstyle<span class="token">=</span><span class="token4">"<li ><a class='on' href='~typelink~'>~typename~</a> </li>"</span><span class="token2">}</span>
<span class="token"><</span>li<span class="token">></span><span class="token"><</span>a href<span class="token">=</span><span class="token4">'[field:typeurl/]'</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>typename<span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span><span class="token"><</span><span class="token">/</span>li<span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>channel<span class="token2">}</span>
调用<span class="token3">2</span>
<span class="token2">{</span>dede<span class="token2">:</span>channelartlist typeid<span class="token">=</span><span class="token4">'top'</span> currentstyle<span class="token">=</span><span class="token4">'on'</span><span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>global name<span class="token">=</span><span class="token4">'itemindex'</span><span class="token">/</span><span class="token2">}</span> <span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>currentstyle<span class="token">/</span><span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>typeurl<span class="token">/</span><span class="token2">}</span><span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>typename<span class="token">/</span><span class="token2">}</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>channelartlist<span class="token2">}</span>
```
```
- 某个栏目标签,可以为空,取当前栏目
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>type typeid<span class="token">=</span><span class="token3">1</span><span class="token2">}</span>
<span class="token"><</span>a href<span class="token">=</span><span class="token4">"[field:typelink /]"</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>typename <span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>type<span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">"typename"</span><span class="token">/</span><span class="token2">}</span>当前栏目名称
<span class="token2">{</span>dede<span class="token2">:</span>channelartlist typeid<span class="token">=</span><span class="token4">"9,10,11"</span><span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>type<span class="token2">}</span>
<span class="token2">[</span>field<span class="token2">:</span>id<span class="token">/</span><span class="token2">]</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>type<span class="token2">}</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>channelartlist<span class="token2">}</span>
```
```
- 友情链接标签
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>flink row<span class="token">=</span><span class="token4">'24'</span> type<span class="token">=</span><span class="token4">'image'</span> titlelen<span class="token">=</span><span class="token4">"24"</span> typeid<span class="token">=</span><span class="token4">"0"</span><span class="token2">}</span> <span class="token"><</span>li<span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>link <span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>li<span class="token">></span> <span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>flink<span class="token2">}</span>
```
```
- 面包屑
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">'position'</span><span class="token">/</span><span class="token2">}</span>
```
```
- 数据库读取标签
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>sql sql<span class="token">=</span><span class="token4">'Select * from #@__arctype where topid=2'</span><span class="token2">}</span>
<span class="token2">[</span>field<span class="token2">:</span>arcpic<span class="token">/</span><span class="token2">]</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>sql<span class="token2">}</span>
```
```
- 万能调用标签
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>loop table<span class="token">=</span><span class="token4">'#@__arctype'</span> sort<span class="token">=</span><span class="token4">'sortrank'</span> row<span class="token">=</span><span class="token4">'4'</span> <span class="token5">if</span><span class="token">=</span><span class="token4">'1=1'</span> orderway<span class="token">=</span><span class="token4">'asc'</span><span class="token2">}</span>
<span class="token2">[</span>field<span class="token2">:</span>typename<span class="token">/</span><span class="token2">]</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>loop<span class="token2">}</span>
```
```
- 文档列表,不能分页,listtype='all' 栏目类型 image含有缩略图 commend推荐
```
<pre class="calibre14">```
自定义字段需要添加addfields<span class="token">=</span><span class="token4">'filetyp'</span> channelid<span class="token">=</span><span class="token4">'3'</span>
<span class="token2">{</span>dede<span class="token2">:</span>arclist row<span class="token">=</span><span class="token3">5</span> titlelen<span class="token">=</span><span class="token3">42</span> typeid<span class="token">=</span><span class="token3">9</span> flag<span class="token">=</span><span class="token4">'p'</span> orderby<span class="token">=</span><span class="token4">'pubdate'</span> orderway<span class="token">=</span><span class="token4">'desc'</span> <span class="token2">}</span>
<span class="token"><</span>a href<span class="token">=</span><span class="token4">"[field:arcurl/]"</span><span class="token">></span><span class="token"><</span>img src<span class="token">=</span><span class="token4">"[field:litpic/]"</span> <span class="token">/</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>title <span class="token5">function</span><span class="token">=</span><span class="token4">'cn_substr(@me,80)'</span> <span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span>
<span class="token2">[</span>field<span class="token2">:</span>infos <span class="token5">function</span><span class="token">=</span><span class="token4">'cn_substr(@me,80)'</span> <span class="token">/</span><span class="token2">]</span> 描述
时间 <span class="token2">[</span>field<span class="token2">:</span>pubdate <span class="token5">function</span><span class="token">=</span><span class="token4">"MyDate('Y-m-d H:i:s',@me)"</span><span class="token">/</span><span class="token2">]</span>
K值 <span class="token2">[</span>field<span class="token2">:</span>global<span class="token2">.</span>autoindex<span class="token">/</span><span class="token2">]</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>arclist<span class="token2">}</span>
随机文章
<span class="token2">{</span>dede<span class="token2">:</span>arclist row<span class="token">=</span><span class="token3">6</span>’ orderby<span class="token">=</span><span class="token4">'rand’ typeid='</span>all' <span class="token2">}</span>
<span class="token"><</span>li<span class="token">></span><span class="token"><</span>a href<span class="token">=</span><span class="token4">"[field:arcurl/]"</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>title<span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span><span class="token"><</span><span class="token">/</span>li<span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>arclist<span class="token2">}</span>
相关文章
<span class="token2">{</span>dede<span class="token2">:</span>likearticle row<span class="token">=</span><span class="token3">6</span><span class="token2">}</span>
<span class="token"><</span>a href<span class="token">=</span><span class="token4">'[field:arcurl/]'</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>title<span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>likearticle<span class="token2">}</span>
```
```
- 热门标签
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>tag row<span class="token">=</span><span class="token4">'10'</span> getall<span class="token">=</span><span class="token4">'1'</span> sort<span class="token">=</span><span class="token4">'month'</span><span class="token2">}</span>
<span class="token"><</span>li<span class="token">></span><span class="token"><</span>a href<span class="token">=</span><span class="token4">'[field:link/]'</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>tag <span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span><span class="token"><</span><span class="token">/</span>li<span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>tag<span class="token2">}</span>
```
```
- 列表和分页调用
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>list col<span class="token">=</span><span class="token4">'3'</span> pagesize<span class="token">=</span><span class="token4">'6'</span> orderby<span class="token">=</span><span class="token4">"default"</span><span class="token2">}</span>
<span class="token"><</span>img src<span class="token">=</span><span class="token4">"[field:litpic/]"</span> alt<span class="token">=</span><span class="token4">""</span><span class="token">/</span><span class="token">></span>
<span class="token"><</span>a href<span class="token">=</span><span class="token4">"[field:arcurl/]"</span><span class="token">></span><span class="token2">[</span>field<span class="token2">:</span>title<span class="token">/</span><span class="token2">]</span><span class="token"><</span><span class="token">/</span>a<span class="token">></span>
<span class="token2">[</span>field<span class="token2">:</span>description<span class="token">/</span><span class="token2">]</span>
<span class="token2">[</span>field<span class="token2">:</span>pubdate <span class="token5">function</span><span class="token">=</span><span class="token4">"MyDate('Y-m-d H:i:s',@me)"</span><span class="token">/</span><span class="token2">]</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>list<span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>pagelist listitem<span class="token">=</span><span class="token4">"pre,pageno,next"</span> listsize<span class="token">=</span><span class="token4">"6"</span><span class="token">/</span><span class="token2">}</span>
```
```
- 内容页
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>title<span class="token">/</span><span class="token2">}</span>_<span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>typename<span class="token">/</span><span class="token2">}</span>_<span class="token2">{</span>dede<span class="token2">:</span>global<span class="token2">.</span>cfg_webname<span class="token">/</span><span class="token2">}</span>标题<span class="token">-</span>栏目<span class="token">-</span>网站名称
文章标题 <span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>title<span class="token">/</span><span class="token2">}</span>
缩略图 <span class="token"><</span>img src<span class="token">=</span><span class="token4">"{dede:field.litpic /}"</span><span class="token">></span>
作者 <span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>writer<span class="token">/</span><span class="token2">}</span>
当前栏目和id名 <span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">"typename"</span><span class="token">/</span><span class="token2">}</span> <span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">"typeid"</span><span class="token">/</span><span class="token2">}</span>
栏目描述 <span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>description<span class="token">/</span><span class="token2">}</span>
栏目链接 <span class="token2">{</span>dede<span class="token2">:</span>type row<span class="token">=</span><span class="token3">1</span><span class="token2">}</span><span class="token2">[</span>field<span class="token2">:</span>typelink <span class="token">/</span><span class="token2">]</span><span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>type<span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">'typename'</span> <span class="token5">function</span><span class="token">=</span><span class="token4">"GetTypeName(@me)"</span><span class="token">/</span><span class="token2">}</span> 函数法获取栏目名
发布时间 <span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">"pubdate"</span> <span class="token5">function</span><span class="token">=</span><span class="token4">"MyDate('Y-m-d',@me)"</span><span class="token">/</span><span class="token2">}</span>
阅读数 <span class="token"><</span>script src<span class="token">=</span><span class="token4">"{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}"</span>type<span class="token">=</span><span class="token4">'text/javascript'</span> language<span class="token">=</span><span class="token4">"javascript"</span><span class="token">></span><span class="token"><</span><span class="token">/</span>script<span class="token">></span>
描述<span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>description<span class="token2">}</span>
内容 <span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>body<span class="token">/</span><span class="token2">}</span>
上一篇下一篇 以及修文字
<span class="token2">{</span>dede<span class="token2">:</span>prenext get<span class="token">=</span><span class="token4">'pre'</span><span class="token">/</span><span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>prenext get<span class="token">=</span><span class="token4">'next'</span><span class="token">/</span><span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>prenext <span class="token5">function</span><span class="token">=</span><span class="token4">"str_replace('上一篇:','上一条:',@me)"</span> get<span class="token">=</span><span class="token4">'pre'</span><span class="token">/</span><span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>prenext <span class="token5">function</span><span class="token">=</span><span class="token4">"str_replace('下一篇:','下一条:',@me)"</span> get<span class="token">=</span><span class="token4">'next'</span><span class="token">/</span><span class="token2">}</span>
图集的上一页下一页
<span class="token2">{</span>dede<span class="token2">:</span>prenext get<span class="token">=</span><span class="token4">'preimg'</span><span class="token">/</span><span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>prenext get<span class="token">=</span><span class="token4">'nextimg'</span><span class="token">/</span><span class="token2">}</span>
```
```
- 实现自定义表单验证码
```
<pre class="calibre14">```
验证函数 onsubmit<span class="token">=</span><span class="token4">"return check()"</span>
<span class="token"><</span>img id<span class="token">=</span><span class="token4">"vdimgck1"</span> onClick<span class="token">=</span><span class="token4">"changeAuthCode();"</span> style<span class="token">=</span><span class="token4">"cursor: pointer;"</span>alt<span class="token">=</span><span class="token4">"看不清?点击更换"</span> src<span class="token">=</span><span class="token4">"/include/vdimgck.php"</span> title<span class="token">=</span><span class="token4">"看不清?点击更换"</span> <span class="token">/</span><span class="token">></span>
<span class="token"><</span>script type<span class="token">=</span><span class="token4">"text/javascript"</span> language<span class="token">=</span><span class="token4">"javascript"</span><span class="token">></span>
<span class="token5">function</span> <span class="token1">changeAuthCode</span><span class="token2">(</span><span class="token2">)</span> <span class="token2">{</span>
var num <span class="token">=</span> <span class="token5">new</span> <span class="token1">Date</span><span class="token2">(</span><span class="token2">)</span><span class="token2">.</span><span class="token1">getTime</span><span class="token2">(</span><span class="token2">)</span><span class="token2">;</span>
var rand <span class="token">=</span> Math<span class="token2">.</span><span class="token1">round</span><span class="token2">(</span>Math<span class="token2">.</span><span class="token1">random</span><span class="token2">(</span><span class="token2">)</span> <span class="token">*</span> <span class="token3">10000</span><span class="token2">)</span><span class="token2">;</span>
num <span class="token">=</span> num <span class="token">+</span> rand<span class="token2">;</span>
$<span class="token2">(</span><span class="token4">'#ver_code'</span><span class="token2">)</span><span class="token2">.</span><span class="token1">css</span><span class="token2">(</span><span class="token4">'visibility'</span><span class="token2">,</span><span class="token4">'visible'</span><span class="token2">)</span><span class="token2">;</span>
<span class="token5">if</span> <span class="token2">(</span>$<span class="token2">(</span><span class="token4">"#vdimgck1"</span><span class="token2">)</span><span class="token2">[</span><span class="token3">0</span><span class="token2">]</span><span class="token2">)</span> <span class="token2">{</span>
$<span class="token2">(</span><span class="token4">"#vdimgck1"</span><span class="token2">)</span><span class="token2">[</span><span class="token3">0</span><span class="token2">]</span><span class="token2">.</span>src <span class="token">=</span> <span class="token4">"/include/vdimgck.php?tag="</span> <span class="token">+</span> num<span class="token2">;</span>
<span class="token2">}</span>
<span class="token5">return</span> <span class="token3">false</span><span class="token2">;</span>
<span class="token2">}</span>
<span class="token"><</span><span class="token">/</span>script<span class="token">></span>
```
```
- 图集输出,有三种显示样式,在系统配置-附件里面,
```
<pre class="calibre14">```
<span class="token2">{</span>dede<span class="token2">:</span>productimagelist<span class="token2">}</span>
<span class="token"><</span>img src<span class="token">=</span><span class="token4">"[field:imgsrc/]"</span> alt<span class="token">=</span><span class="token4">"[field:text/]"</span><span class="token">/</span><span class="token">></span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>productimagelist<span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>field name<span class="token">=</span><span class="token4">'imgurls'</span> alt<span class="token">=</span><span class="token4">'图片输出区'</span><span class="token2">}</span>
<span class="token2">[</span>field<span class="token2">:</span>pagestyle runphp<span class="token">=</span><span class="token4">'yes'</span><span class="token2">]</span> @me<span class="token">=</span> <span class="token2">(</span>@me<span class="token">==</span><span class="token3">1</span> <span class="token">?</span> <span class="token4">'<li>'</span> <span class="token2">:</span> <span class="token4">''</span><span class="token2">)</span><span class="token2">;</span><span class="token2">[</span><span class="token">/</span>field<span class="token2">:</span>pagestyle<span class="token2">]</span>
<span class="token"><</span>img src<span class="token">=</span><span class="token4">'[field:imgsrc/]'</span> alt<span class="token">=</span><span class="token4">'[field:alttext /]'</span> <span class="token">/</span><span class="token">></span>
<span class="token2">[</span>field<span class="token2">:</span>title <span class="token">/</span><span class="token2">]</span>
<span class="token2">[</span>field<span class="token2">:</span>pagestyle runphp<span class="token">=</span><span class="token4">'yes'</span><span class="token2">]</span> @me <span class="token">=</span> <span class="token2">(</span>@me<span class="token">==</span><span class="token3">1</span> <span class="token">?</span> <span class="token4">'</li>'</span> <span class="token2">:</span> <span class="token4">''</span><span class="token2">)</span><span class="token2">;</span> <span class="token2">[</span><span class="token">/</span>field<span class="token2">:</span>pagestyle<span class="token2">]</span>
<span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>field<span class="token2">}</span>
分页自写 在arc<span class="token2">.</span>archives<span class="token2">.</span>class<span class="token2">.</span>php里面定义
pagestyle2 pagestyle3 表示幻灯片 和mn行列
<span class="token2">{</span>dede<span class="token2">:</span>imgbreak<span class="token">/</span><span class="token2">}</span>
```
```
- 数组的输出,在数组输出中
```
<pre class="calibre14">```
<span class="token2">[</span>field<span class="token2">:</span>array runphp<span class="token">=</span><span class="token4">'yes'</span><span class="token2">]</span>
<span class="token5">if</span><span class="token2">(</span>@me<span class="token2">[</span><span class="token4">'litpic'</span><span class="token2">]</span><span class="token">==</span><span class="token4">'/images/defaultpic.gif'</span><span class="token2">)</span><span class="token2">{</span>
@me<span class="token">=</span> <span class="token1">get_imgs2</span><span class="token2">(</span>@me<span class="token2">[</span><span class="token4">'id'</span><span class="token2">]</span><span class="token2">,</span><span class="token3">1</span><span class="token2">)</span><span class="token2">;</span>
<span class="token2">}</span><span class="token5">else</span><span class="token2">{</span>
@me<span class="token">=</span>@me<span class="token2">[</span><span class="token4">'litpic'</span><span class="token2">]</span><span class="token2">;</span>
<span class="token2">}</span><span class="token2">[</span><span class="token">/</span>field<span class="token2">:</span>array<span class="token2">]</span>
```
```
栏目里判断
```
<pre class="calibre16">```
<span class="token2">{</span>dede<span class="token2">:</span>field<span class="token2">.</span>array runphp<span class="token">=</span><span class="token4">'yes'</span><span class="token2">}</span><span class="token5">if</span><span class="token2">(</span>@me<span class="token2">[</span>id<span class="token2">]</span><span class="token">==</span><span class="token3">3</span><span class="token2">)</span><span class="token2">{</span>$url <span class="token">=</span> @me<span class="token2">[</span><span class="token4">'typeurl'</span><span class="token2">]</span><span class="token2">;</span>@me<span class="token">=</span><span class="token4">"onclick=\"location.href='$url'\""</span><span class="token2">;</span><span class="token2">}</span><span class="token5">else</span><span class="token2">{</span>@me<span class="token">=</span><span class="token4">""</span><span class="token2">;</span><span class="token2">}</span><span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>field<span class="token2">.</span>array<span class="token2">}</span>
<span class="token2">{</span>dede<span class="token2">:</span>global name<span class="token">=</span><span class="token4">'itemindex'</span> runphp<span class="token">=</span><span class="token4">'yes'</span><span class="token2">}</span><span class="token5">if</span><span class="token2">(</span>@me<span class="token">==</span><span class="token3">2</span><span class="token2">)</span><span class="token2">{</span>@me<span class="token">=</span><span class="token4">"<br />"</span><span class="token2">;</span><span class="token2">}</span><span class="token5">else</span><span class="token2">{</span>@me<span class="token">=</span><span class="token4">' '</span><span class="token2">;</span><span class="token2">}</span><span class="token2">{</span><span class="token">/</span>dede<span class="token2">:</span>global<span class="token2">}</span>
<span class="token2">[</span>field<span class="token2">:</span>global name<span class="token">=</span><span class="token4">'autoindex'</span> runphp<span class="token">=</span><span class="token4">'yes'</span><span class="token2">]</span><span class="token5">if</span><span class="token2">(</span>@me<span class="token">==</span><span class="token3">2</span><span class="token2">)</span><span class="token2">{</span>@me<span class="token">=</span><span class="token4">"<br />"</span><span class="token2">;</span><span class="token2">}</span><span class="token5">else</span><span class="token2">{</span>@me<span class="token">=</span><span class="token4">' '</span><span class="token2">;</span><span class="token2">}</span><span class="token2">[</span><span class="token">/</span>field<span class="token2">:</span>global<span class="token2">]</span> 用于channel
```
```
- 简介
- 第一章 数据库
- Mysql/mariadb
- 函数
- 基础
- 增删改索引
- 标准查询
- 高级查询
- TIDB集群mysql解决方案
- Redis
- 语言基础
- 5种数据类型
- 其他类型
- Sqlite
- 语言基础
- 常用查询
- 第二章 PHP
- 语言基础
- 第一课 流程控制和运算
- 第二课 数组
- 第三课 日期时间
- 第四课 常用函数
- 第五课 字符串
- 第六课 文件操作
- 第七课 面向对象
- 第八课 正则表达式
- 第九课 图片处理生成
- 第十课 curl/memche
- 第十一课 mysql和pdo
- 第十三课 cookie和session
- 第十四课 xml操作
- 第十五课 php5.3+新特性
- 第十六课 php7+
- 第十七课 密码安全
- 废弃函数
- php命令行
- redis应用
- 算法
- 排序算法
- 基础算法
- 无限级分类
- 自定义函数Fn
- 查找算法
- 自定义函数数据函数fn
- laravel
- 路由
- 常用语句
- 数据库
- dingo/api
- Yii2
- 控制器
- 常用类
- 数据库
- redis
- thinkphp6
- TP6文档
- TP6插件
- dedecms
- 织梦标签大全
- 数据库操作
- 内置函数和定义函数
- 织梦核心改动
- 织梦插件/底层标签开发
- PHP相关工具
- composer
- php开发环境phpenv
- Phpstorm使用
- windows编译php扩展
- PHP开源库
- 开源项目管理禅道
- sns_auth
- php-casbin权限控制
- php-jwt
- 微信SDKeasywechat
- querylist采集库
- workerman
- Box/Spout处理excel和csv
- dll扩展
- redis/memche/xdebug
- redis
- Lua
- php_xlswriter
- event
- swoole
- 常用代码库
- 微擎框架
- 第一课全局变量
- 第二课常用函数
- 第三课自定义微擎独有函数
- 第四课数据库操作
- 第五课微信端回复
- 第六课微擎高级操作
- 第八课global函数列表
- mainfest.xml详解
- js方法
- 人人商城
- 第一课model解读
- 第二课常用语句解读
- 第三课常用js解读
- 第四课附录常见问题
- 第五课附录处理报表|支付
- 常用JSON状态码
- 第三章 JavaScript
- js基础
- 浏览器对象
- 语言基础
- html5接口
- ES6新语法
- vue
- 基础语法
- 京东vueUI组件
- uniapp
- 组件开发规范
- nodejs
- 基础知识
- 安装node
- nvm不同版本node切换
- js常用标准库
- zepto/jquery
- weui
- js图标库
- elementUI
- validator表单验证
- layer弹出层
- requirejs
- wow动画
- 动画animate
- swiper4
- 百度编辑器
- flyio/axios/qs
- jquery.form
- bootstrap3
- clipboard复制
- slideout侧滑
- imagehover.css图片悬停动画
- webpack打包
- Bulma UI框架
- store 客户端存储
- lottie动画创建库
- sweetalert
- js自定义函数
- 常见JSSDK
- 微信公众号JSSDK
- 腾讯地图jssdk
- 微信小程序
- 第四章 编程语言
- markdown语言
- Dart语言
- Dart语言基础
- Flutter框架
- Lua语言
- 字符串,数组,表
- 自定义方法
- go语言
- 第1.1语言基本语法
- 第1.2流程控制
- 第1.3函数
- 第1.4结构体
- 第1.5接口
- 第1.6包
- go语言框架Gin
- CSS3语言
- CSS与CSS3
- 选择符
- 属性
- css3
- loading动画
- HTML5语言
- less
- sass
- C#
- 基础知识
- 函数
- 第五章 开发工具
- git
- nginx/apache服务器
- Linux常用操作
- crontab定时任务
- 注册表与cmd
- 阿里云ECS
- frp穿透和ssl续期
- 宝塔安装
- 树莓派
- 浏览器模拟
- 火狐/chrome常用插件
- WSL安装使用
- mac brew和终端命令
- win10相关