芝麻通网
标签首页
栏目列表
内容详情
表单搜索
迅睿官方标签生成器
全局变量
网站信息
全站SEOTDK
{$meta_title}
首页SEO标题
{SITE_TITLE}
首页SEO关键字
{SITE_KEYWORDS}
首页SEO描述信息
{SITE_DESCRIPTION}
头部模板
{template "header.html"}
尾部模板
{template "footer.html"}
边栏模版
{template "sidebar.html"}
搜索框
保护代码
{code}{/code}
网站名称
{SITE_NAME}
LOGO
{SITE_LOGO}
备案号
{SITE_ICP}
备案号带链接
{SITE_ICP}
统计代码
{SITE_TONGJI}
友情链接
{php $yqlj = dr_site_value('yqlj');} {loop $yqlj $v}
{$v[1]}
{/loop}
幻灯图片
{php $hdtp = array_slice(dr_site_value('hdtp'), 0, 10);} {loop $hdtp $v} {dr_get_file($v[1])} {$v[2]} {$v[3]} {/loop}
热门搜索词
{php $arr = array_slice(dr_site_value('hotkeywords'), 0, 10);} {loop $arr $v}
{$v[1]}
{/loop}
全局变量
目录链接
PC首页
{SITE_URL}
移动站首页
{SITE_MURL}
默认风格路径
{ROOT_THEME_PATH}
用户中心地址
{MEMBER_URL}
网站目录
{WEB_DIR}
资源目录
{THEME_PATH}
当前模板风格
{HOME_THEME_PATH}
移动端风格目录路径
{MOBILE_THEME_PATH}
当前页面的地址
{$my_web_url}
当前页面的手机站地址
{dr_rp($my_web_url, SITE_URL, SITE_MURL)}
当前终端的域名
{CLIENT_URL}
当前url的域名部分
{DOMAIN_NAME}
当前网站的语言包目录
{LANG_PATH}
项目目录s变量值
{APP_DIR}
当前模块目录
{MOD_DIR}
js移动设备首页跳转
js移动设备全站跳转
指定栏目文章数
{count action=module module=article catid=11}
全局变量
联系信息
联系人
{dr_site_value('cfg_name')}
联系电话
{dr_site_value('cfg_tel')}
手机号码
{dr_site_value('cfg_phone')}
联系地址
{dr_site_value('cfg_address')}
微信号码
{dr_site_value('cfg_wechat')}
QQ
{dr_site_value('cfg_qq')}
电子邮箱
{dr_site_value('cfg_email')}
category
栏目循环
共享顶级栏目
{category module=share pid=0 num=10}{/category}
一级二级栏目
{category module=share pid=0} {if $t.child}{/if} {category module=share pid=$t.id return=t2} {if IS_SHARE && $catid && dr_in_array($catid, $t2.catids)} active{/if} {if $t2.child}{/if} {/category} {/category}
一级二级三级
{category module=share pid=0} {if $t.child}{/if} {category module=share pid=$t.id return=t2} {if IS_SHARE && $catid && dr_in_array($catid, $t2.catids)} active{/if} {if $t2.child}{/if} {category module=share pid=$t2.id return=t3} {if IS_SHARE && $catid && dr_in_array($catid, $t3.catids)} active{/if} {/category} {/category} {/category}
栏目与文档
{category module=share pid=0} {$t.name}{$t.url} {module module=$t.mid catid=$t.id num=10 cache=1 return=t2} {$t2.title}{$t2.url} {/module} {/category}
指定单个栏目
{category module=share id=1}{$t.url}{/category}
子栏目
{category module=share pid=$parent.id}{/category} class="active"
调用栏目和附带SEO信息
{category module=share id=1 more=1} {$t['setting']['seo']['list_title']} {$t['setting']['seo']['list_keywords']} {$t['setting']['seo']['list_description']} {/category}
category
栏目变量
栏目名称
{$t.name}
栏目链接
{$t.url}
目录名称
{$t.dirname}
缩略图
{dr_thumb($t.thumb)}
缩略图原图
{dr_get_file($t.thumb)}
缩略图判断
{if $t.thumb}{dr_get_file($t.thumb)}{else}/static/assets/images/nopic.gif{/if}
栏目内容
{$t.content}
栏目内容截取
{dr_strcut(dr_clearhtml($t.content), 200, '...')}
栏目SEO信息
{php $my=dr_share_cat_value($t.id, 'setting');} {$my.seo.list_title} {$my.seo.list_keywords} {$my.seo.list_description}
是否有下级
{if $t.child}{/if}
首页高亮
{if $indexc} class="active"{/if}
栏目高亮
{if IS_SHARE && $catid && dr_in_array($catid, $t.catids)} class="active"{/if}
指定栏目名称
{dr_share_cat_value(1, 'name')}
指定栏目链接
{dr_share_cat_value(1, 'url')}
外部地址新窗口打开
{if $t.tid == 2} target="_blank"{/if}
调用隐藏栏目
{category module=share id=1 show=1}{$t.name}{/category}
module
文档列表
调用文档列表
{module module=article catid=2 order=updatetime num=10 cache=1}{/module}
带附表字段
{module module=article catid=1 join=1_article_data_0 on=id order=updatetime num=10 cache=1}{/module}
带栏目字段
{module module=article catid=1 more=1 order=updatetime num=10 cache=1}{/module}
自定义sql条件
{php $where=urlencode(" `myflag` LIKE '%h%' OR `myflag` LIKE '%p%' ");} {module module=article catid=1 order=updatetime where=$where num=4 cache=1}
myflag字段条件筛选
{module module=article catid=1 JSON_myflag=h|c order=updatetime num=10 cache=1}{/module}
有缩略图条件
{module module=article thumb=1 catid=1 order=updatetime num=10 cache=1}{/module}
指定文档ID条件
{module module=article IN_id=1,2,3 order=id_instr cache=1}{/module}
module
文档变量
id
{$t.id}
标题
{$t.title}
链接
{$t.url}
标题截取
{dr_strcut($t.title, 30, '')}
缩略图
{dr_thumb($t.thumb)}
缩略图原图
{dr_get_file($t.thumb)}
缩略图判断
{if $t.thumb}{dr_get_file($t.thumb)}{else}/static/assets/images/nopic.gif{/if}
描述
{$t.description}
描述截取
{dr_strcut($t.description,100, '...')}
当前行数1
{$key+1}
当前行数判断
{if ($key+1)%2==0}双{else}单{/if}
栏目名称
{dr_cat_value('news', $t['catid'], 'name')}
栏目链接
{dr_cat_value('news', $t['catid'], 'url')}
时间年月日
{dr_date($t._updatetime, 'Y-m-d')}
浏览次数
{intval($t['hits'])}
更新时间
{$t.updatetime}
时间年月日时分秒
{dr_date($t._updatetime, 'Y-m-d H:i:s')}
时间友好
{dr_fdate($t['_updatetime'])}
录入时间
{$t.inputtime}
时间年月日时分秒
{dr_date($t._inputtime, 'Y-m-d H:i:s')}
时间友好
{dr_fdate($t['_inputtime'])}
浏览次数(动)
{dr_show_hits($t['hits'], '', 'news')}
栏目缩略图
{dr_get_file(dr_cat_value('news', $t['catid'], 'thumb'))}
父栏目名称
{dr_cat_value($t.mid, dr_cat_value($t.mid, $t['catid'], 'pid'), 'name')}
父栏目链接
{dr_cat_value($t.mid, dr_cat_value($t.mid, $t['catid'], 'pid'), 'url')}
是否第一条
{if $is_first}第一条{/if}
是否最后一条
{if $is_last}最后一条{/if}
笔名
{$t.author}
会员id
{$t['uid']}
会员头像
{dr_avatar($t['uid'])}
内容
{$t['content']}
内容去掉html
{dr_clearhtml($t['content'])}
内容去掉html再截
{dr_strcut(dr_clearhtml($t['content']), 10, '...')}
会员其他字段
{php $user=dr_member_info($t['uid']);} 会员name:{$user.name} 会员username:{$user.username} 会员phone:{$user.phone} 会员email:{$user.email}
myflag显示文字
{$info.myflag}
关键词
Tag循环
最新20个
{tag num=40}
{$t.name}
{/tag}
随机20个
{tag num=20 order=rand}
{$t.name}
{/tag}
点击量20
{tag num=20 order=hits}
{$t.name}
{/tag}
文章页
{tag tag=urlencode($tag) order=rand num=20}
{$t.name}
{/tag}