常用标签
-
首页TDK
title/keywords/description
ဆ
<title>{dede:global.cfg_webname/}</title> <meta name="description" content="{dede:global.cfg_description/}" /> <meta name="keywords" content="{dede:global.cfg_keywords/}" />
-
列表页TDK
title/keywords/description
ဆ
<title>{dede:field.title/}-{dede:global.cfg_webname/}</title> <meta name="keywords" content="{dede:field name='keywords'/}" /> <meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
-
内容页TDK
title/keywords/description
ဆ
<title>{dede:field.title/}-{dede:global.cfg_webname/}</title> <meta name="keywords" content="{dede:field.keywords/}" /> <meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
-
搜索页TDK
title/keywords/description
ဆ
<title>{dede:global.keyword function=RemoveXSS(@me)/}的搜索结果{dede:global.cfg_webname/}</title> <meta name="keywords" content="{dede:global.keyword function=RemoveXSS(@me)/},{dede:field name='keywords'/}" /> <meta name="description" content="{dede:field name='description' function='html2text(@me)'/}" />
-
首页跳转手机站JS
mobile-agent
ဆ
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}"> <script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
-
列表页跳转手机站JS
mobile-agent
ဆ
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}/list.php?tid={dede:field.id/}"> <script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}/list.php?tid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
-
内容页跳转手机站JS
mobile-agent
ဆ
<meta http-equiv="mobile-agent" content="format=xhtml;url={dede:global.cfg_mobileurl/}/view.php?aid={dede:field.id/}"> <script type="text/javascript">if(window.location.toString().indexOf('pref=padindex') != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf("?mobile")<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href="{dede:global.cfg_mobileurl/}/view.php?aid={dede:field.id/}";}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
-
手机站首页跳转PC
mobile-agent
ဆ
<script> if(navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ) {} else { window.location.href = "{dede:global.cfg_basehost/}"; } </script>
-
手机列表页跳转PC
mobile-agent
ဆ
<script> if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ){ }else{ window.location.href="{dede:global.cfg_basehost/}{dede:type}[field:typeurl/]{/dede:type}"; } </script>
-
手机内容页跳转PC
mobile-agent
ဆ
<script> if( navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPod/i) || navigator.userAgent.match(/BlackBerry/i) || navigator.userAgent.match(/Windows Phone/i) ){ }else{ window.location.href="{dede:global.cfg_basehost/}{dede:field.id runphp=yes}$result=GetOneArchive(@me);@me=$result['arcurl'];{/dede:field.id}"; } </script>
-
当前位置
ဆ
{dede:field name='position'/}
-
样式路径
ဆ
{dede:global.cfg_templets_skin/}/
-
头部文件引用
ဆ
{dede:include filename='head.htm'/}
-
底部文件引用
ဆ
{dede:include filename='footer.htm'/}
-
手机站栏目列表链接
ဆ
list.php?tid=[field:id/]
-
手机站文章列表链接
ဆ
view.php?aid=[field:id/]
-
织梦手机站模板制作方法
ဆ
-
织梦被挂马最简单快捷的解决方法
ဆ
- 云服务器活动特惠,最低仅需84.97元/年,助力轻松上云
导航标签
-
导航调用
{dede:channel}
ဆ
{dede:channel type='top' row='10'} <a href='[field:typeurl/]'>[field:typename/]</a> {/dede:channel}
-
导航选中高亮
currentstyle
ဆ
{dede:channel type='top' row='10' currentstyle="<li class='on'><a href='~typelink~'>~typename~</a></li>"} <li><a href='[field:typeurl/]'>[field:typename/]</a></li> {/dede:channel}
-
二级导航嵌套
{dede:channelartlist }
ဆ
{dede:channelartlist typeid="top"} <li> <a href="{dede:field name="typeurl"/}">{dede:field name="typename"/}</a> <ul> {dede:channel type="son"} <li><a href="[field:typeurl/]">[field:typename/]</a></li>{/dede:channel} </ul> </li> {/dede:channelartlist}
-
channelartlist标签调用
ဆ
{dede:channelartlist typeid='1' row='1'} <li><a href='{dede:field name='typeurl'/}'> {dede:field name='typename'/}</a></li> {/dede:channelartlist}
首页列表调用标签
-
首页文章列表
{/dede:arclist}
ဆ
{dede:arclist typeid='1' row='10' titlelen='255' orderby='pubdate'} <li> <a href="[field:arcurl/]">[field:title/]</a> </li> {/dede:arclist}
-
首页列表调用自定义标签
addfields
ဆ
{dede:arclist row='10' typeid=1 titlelen='255' addfields='jiage' channelid='1'} <a href='[field:arcurl/]'>[field:title/]</a> <a href='[field:arcurl/]'>[field:jiage/]</a> {/dede:arclist}
-
判断缩略图是否为空
addfields
ဆ
[field:litpic runphp=yes]if(stristr(@me,'defaultpic'))@me = "没有缩略图";else @me = "<img src='@me'>";[/field:litpic]
-
幻灯片插件调用标签
addfields
ဆ
{dede:flash typeid='1' row='10' titlelen='255'} <img src="[field:litpic/]" /> {/dede:flash}
列表页标签
-
列表循环标签
{/dede:list}
ဆ
{dede:list pagesize='10' titlelen='255'} <a href='[field:arcurl/]'> [field:title/] [field:picname/] </a> {/dede:list}
-
列表页分页
{dede:pagelist}
ဆ
{dede:pagelist listitem='index,pre,next,pageno,end,info,option,' /}
-
数字递增标签
[field:global.autoindex/]
ဆ
[field:global.autoindex/]
-
当前栏目
{dede:field.typename/}
ဆ
{dede:field.typename/}
-
指定栏目及链接
{/dede:type}
ဆ
{dede:type typeid='1'}<a href='[field:typeurl/]'>[field:typename/]</a>{/dede:type}
-
栏目内容
{dede:field.content/}
ဆ
{dede:field.content/}
-
首页调用指定栏目内容
{dede:field.content/}
ဆ
{dede:sql sql="SELECT content FROM #@__arctype WHERE id=1"} [field:content function=cn_substr(html2text(@me),380)/]... {/dede:sql}
-
栏目页跳转第一个子栏目
{dede:field.content/}
ဆ
<script type="text/javascript"> {dede:channel type='son' row='1'} window.location.href='[field:typelink /]'; {/dede:channel} </script>
列表页底层标签
-
文章标题
ဆ
[field:title/]
-
文章链接
ဆ
[field:arcurl/]
-
文章短标题
ဆ
[field:shorttitle/]
-
发布日期1
ဆ
[field:pubdate function='GetDateTimeMK(@me)' /]
-
发布日期2
ဆ
[field:pubdate function="MyDate('Y-m-d H:i:s',@me)"/]
-
缩略图
ဆ
[field:picname/]
-
所属栏目
ဆ
[field:typelink/]
-
文章描述
ဆ
[field:description function="cn_substr(@me,255)"/]
-
点击次数
ဆ
[field:click/]
-
列表分页通用CSS样式
ဆ
//HTML代码 <div class="six-pages"> <ul> {dede:pagelist listitem='index,pre,next,pageno,end,info,option,' /} </ul> </div> //CSS样式代码 .six-pages{width:100%} .six-pages ul{display:flex;flex-wrap:wrap;justify-content:flex-start} .six-pages ul li{background-color:#ddd;color:#666;margin-right:8px;color:white;font-size:14px;border-radius:3px;overflow:hidden;height:30px;line-height:30px} .six-pages ul li a{display:block;width:100%;color:#666;font-size:14px;padding:0 14px} .six-pages ul li.thisclass{background-color:#01AAED} .six-pages ul li.thisclass a{color:white} .six-pages ul li:last-child{color:#666;padding:0 14px}
内容页标签
-
文章标题
ဆ
{dede:field.title/}
-
文章短标题
ဆ
{dede:field.shorttitle/}
-
文章缩略图
ဆ
{dede:field name='litpic'/}
-
发布日期
ဆ
{dede:field.pubdate function="MyDate('Y-m-d H:i',@me)"/}
-
正文内容
ဆ
{dede:field.body/}
-
文章简介
ဆ
{dede:field.description/}
-
文章作者
ဆ
{dede:field.writer/}
-
文章来源
ဆ
{dede:field.source/}
-
点击次数
ဆ
<script src='{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}'type='text/javascript' language='javascrip' ></script>
-
文章URL
ဆ
{dede:field name='arcurl'/}
-
上一篇
ဆ
{dede:prenext get='pre'/}
-
下一篇
ဆ
{dede:prenext get='next'/}
-
图集标签
ဆ
{dede:productimagelist} <img src="[field:imgsrc/]" alt="[field:text/]"/> {/dede:productimagelist}
-
文章Tag标签
ဆ
{dede:tag row='10' sort='new' getall='0'} <a href="[field:link/]">[field:tag /]</a> {/dede:tag}
-
内容页分页标签
ဆ
{dede:pagebreak/}
-
相关文档调用
ဆ
{dede:likearticle mytypeid='' row='' col='' titlelen='' infolen=''} <a href='[field:arcurl/]'>[field:title/]</a> {/dede:likearticle}