一、首页标签
1、公共标签:
{$tpl}static/js/jquery.min.js
{include="header"}
{include="footer"}
2、导航部分
{loop table="classtype" orderby="orders desc" isshow="1" pid="0" limit="4" as="v"}
{$v['classname']}
{if($classtypedata[$v['id']]['haschild'])}
{/if}{foreach $classtypedata[$v['id']]['children']['list'] as $vv}
{/foreach}
{/loop}
3、轮播图:
{loop table="collect" orderby="orders desc" tid="1" isshow="1" as="v"}{/loop}
4、文章/产品循环标签:
{loop tid="21,22" orderby="orders desc,hits desc,addtime desc,id desc" isall="1" limit="2" as="v" istuijian="1" notempty="litpic"} {$v_n}:计数,从1开始计 {$v_key}:计数,从0开始计{fun date('Y-m-d H:i:s',$v['addtime'])}{$classtypedata[$v['tid']]['classname']}{fun newstr($v['title'],30)}{fun newstr($v['description'],130)}了解详情{/loop}
5、IF判断:
{loop table="article" limit="24" isshow="1" as="v"} {if($v_n%2==1)}{$v['title']}{else}{$v['title']}{/if} {/loop}6、单页标签:{$classtypedata[4]['classname']}{$classtypedata[4]['body']} 更多>> 7、TAG列表:{loop table="tags" isshow="1" as="v"} 标签名:{$v['keywords']} 标签详情链接2:{fun U('tags/index',['tagname'=>$v['keywords']])} 标签详情链接2:{fun U('tags/index',['id'=>$v['id']])} 标签的数量:{$v['number']} 汇集页链接:{fun U('tags/index')} {/loop}8、友情链接:{loop table="links" isshow="1" orderby="orders desc" as="v"}{$v["title"]}{/loop} {if(!$v_n)}暂无友情链接内容,请后台添加!{/if}9、站内搜索:单模搜索全局搜索
二、列表页标签
1、公共标签:
{$type['classname']}-{$webconf['web_name']}当前位置:{$positions}
2、顶级栏目图片
{php $topclass = array_shift($positions_data) /}
3、栏目分类
{php $topclass = array_shift($positions_data) /}{$topclass["classname"]}{if($classtypedata[$type['id']]['haschild'])} {foreach $classtypedata[$type['id']]['children']['list'] as $v}{$v['classname']}{/foreach} {else} {foreach $classtypedata as $v} {if($type['pid']==$v['pid'])}{$v['classname']}{/if} {/foreach} {/if}
4、内页列表循环
{foreach $lists as $v}{fun date('Y-m-d H:i:s',$v['addtime'])}{$classtypedata[$v['tid']]['classname']}{$v['title']}{fun newstr($v['description'],100)}了解详情{/foreach}
5、内页分页
{if($lists)}首页上一页{foreach $listpage['list'] as $ss}{$ss['num']}{/foreach}下一页尾页{/if}
三、留言表单
留言邮箱:留言内容:留言验证码:更多字段请仿照填写...
四、内容详情
1、公共标签:
{$jz['seo_title']}-{$webconf['web_name']}
2、内容详情:
{$jz["title"]}作者:{fun adminInfo($jz["userid"],"name")} 来源:{$jz["copyfrom"]} 更新时间:{fun date("Y-m-d",$jz["addtime"])} 浏览次数:{$jz["hits"]} 评论数:{fun $count = M("comment")->getCount(["aid"=>$jz["id"],"tid"=>$jz["tid"]])}{$jz["body"]}{if($aprev)}上一篇:{$aprev["title"]}{else}没有了{/if} {if($anext)}下一篇:{$anext["title"]}{else}没有了{/if}
3、商品图集:
{php $pictures = explode('||',$jz['pictures']) /} {foreach $pictures as $v} {php $pic = explode('|',$v); /}{/foreach}
4、相关内容:
{loop table="article" tid="$jz["tid"]" notin="id|$jz["id"]" orderby="rand()" limit="10" as="v"} {$v['title']}{$v['description']}{fun date("Y-m-d",$v["addtime"])}{/loop}
5、内容页tag
{foreach explode(",",$jz["tags"]) as $s} {if($s)}{$s}{/if} {/foreach}