使用织梦系统最经常是为了仿站,那么模板应该怎么改?
这里主要谈谈关于比较常用的几个模板页
网站主页、列表页、内容页、栏目的调用
1.主页模板
常用组合方法:index.htm + head.htm + footer.htm
嵌套语句:{dede:include filename="head.htm"/}
head.htm :网站头部(顶部+导航栏),所以也可继续拆分。一般顶部内容为从body后开始至导航栏。
导航栏 (自动获取栏目信息)
<div id="navtabs">
<a href="{dede:global.cfg_cmsurl/}/" class="current">首页</a>
{dede:channel type='top' row='10' currentstyle="<a href='~typelink~' >~typename~</a>"}
<a href='[field:typeurl/]' >[field:typename/]</a>
{/dede:channel}
</div> 二级栏目:直接指定所有二级链接,原网站都有js控制,直接拿来用就行
footer.htm:网站底部,包含版权信息,具体看实际的布局,大部分网站的友情链接作为独立模块在底部,包含进来更方便。
首页调用文章列表的方法,通过标签进行嵌套就行
示例:
{dede:arclist row='9' typeid='2' infolen='300'}
<li><div class="ntitle f_l">
·<a href="[field:arcurl/]" class="hei" title="[field:fulltitle/]" target="_blank">
[field:fulltitle function='cn_substr(@me,80)'/]
</a></div>
<div class="ndate f_r"><a href="[field:arcurl/]" class="hui" target="_blank">[field:pubdate function="MyDate('Y-m-d',@me)"/]</a>
</div></li>
{/dede:arclist}
效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaMAAABSCAIAAAB2TiyrAAAKjklEQVR4nO2dS3JkRQxFewu1CsaE98RCGLMXArbAlIZNMIAJvw4awnY5GXT0i9cp6epK9XX2PQPHKz2lpPzoulwVrnozxhjHcRxjjOdxXY7H4+7BGMfnX/5+/PKbt198/cNv/zyN47PvKYQQHMfj+P7tuzHGmw+PH1/GGM/Xl5NNwt6/jPcvYxyff333+Ptfx5eXfx9fxn9PEjshRJ+np/Htz3+MTel+/MjmIYssssiygOW7n/4cm9IJIcSSSOmEEOsjpRNCrI+UTgixPlI6IcT6SOmEEOvTUbrD4ZBamFG8w+FwcO/iSg6fwlTYm1qbLfjBwJRhnclqbTqwRPwK9NZqGgXWZH/LDmFO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QQ6/NB6f4HNdWi13EAdfIAAAAASUVORK5CYII=" alt="" />
dede arclist里field:body的调用方法:
用arclist调用附加表字段,要获取附加表内容,必须指定两个条件:1、指定channelid 属性;2、指定要获得的字段addfields='字段1,字段2'。
{dede:arclist row='5' channelid='1' addfields='body' typeid='1' orderby='rand'}
控制body的长度:[field:body function="cn_substr(html2text(@me),120)"/]
{/dede:arclist}
缩略标题
[field:title function='(strlen("@me")>60?cn_substr("@me",60)."…":"@me")'/]
2.文章列表页
栏目名称:{dede:field name='typename' /}
获取*栏目下的所有栏目:
{dede:channel type='son' typeid='1'}
<li>
<a href="[field:typelink/]" title="[field:typename/]" style="color:#003366;background-position:-46px -78px;">[field:typename/]</a>
</li>
{/dede:channel}
获取栏目下的文章分页列表
{dede:list pagesize='5'}
<li>
<div class='fleft'>
<h1>
<a href="[field:arcurl/]" title='[field:title/]'>·[field:title/]</a>
<span class='addtime'>[field:pubdate function='strftime("%Y-%m-%d",@me)'/]</span> <img src="/images/public/hot06.gif">
</h1>
<p>
[field:body function='cn_substr(html2text(@me),350)'/]...
</p>
</div>
<a href="[field:arcurl/]" title='[field:title/]' class='a'>查看详情 >>></a><div class='clearfix'>
</div>
</li>
{/dede:list}
分页
<style type='text/css'>
.pagelist{padding-top: 10px;padding-bottom: 10px; text-align: center;}
.pagelist li{ display: inline; line-height: 22px;}
.pagelist li a{margin-right: 5px;padding-right: 5px;padding-left: 5px;padding-top: 3px;padding-bottom: 3px;border: 1px solid #CCC;
}
.thisclass {font-weight: bold;color: #C00;}
</style> <ul class="pagelist">
{dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/}
</ul>
效果:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqQAAAC2CAIAAACApQhHAAAar0lEQVR4nO2dz6olOXLG6yUa5hUaPGC4y36Auykw3s3Ke69mbzB4UXgabPCAF8YM3njpt6jGDMY0fqX04lCJSor49EmZef7o/n5cijzKUERICuk7ec7tvp82AAAAWJpPj04AAAAAr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zZK9F/ayT8eH/u9yzxN7//bih9HyzbvSLcrtx+ufkF5WfrnD0Hu4DYg8fjoeL/WN55lE8+dQBvC6IPXw4EPsTzc7lyacO4HVB7OHDgdifaHYuTz51AK8LYg8fDsT+RLNzefKpA3hdEHv4cPx6gKv934dnHsWxtQWAGMQeAABgcRB7AACAxUHsAQAAFgexBwAAWBzEHgAAYHEQewAAgMVB7AEAABYHsQcAAFgcxB4AAGBxEHsAAIDFQewBAAAWB7EHAABYHMQeAABgcRB7AACAxUHsAQAAFgexBwAAWBzEHgAAYHH+H3zaj2asIsHZAAAAAElFTkSuQmCC" alt="" />
3.文章内容页
文章标题:{dede:field.title/}
网站名称:{dede:global.cfg_webname/}
来源:{dede:field name='source'/}
标签:
<div class="singleout">
<div class="singlein">
<div class="news_show">
<h1 style="color:#003366;">{dede:field.title/}</h1>
<h2 style="border-top:#663300 1px dashed;color:#666666;">
发布者:{dede:field.writer/}
发布时间:{dede:field.pubdate function="MyDate('Y-m-d',@me)"/}
点击:<script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' language="javascript"></script>次
</h2>
<div class="showcontent">
{dede:field.body/}
</div>
</div>
</div>
</div>
上一篇下一篇
<ul>
<li>{dede:prenext get='pre'/}</li>
<li>{dede:prenext get='next'/}</li>
</ul>
直接调用上一篇地址和下一篇地址的代码如下:
上一篇地址
{dede:prenext get='pro' runphp="yes"}preg_match_all('/<a.*?(?: |\\t|\\r|\\n)?href=[\'"]?(.+?)[\'"]?(?:(?: |\\t|\\r|\\n)+.*?)?>(.+?)<\/a.*?>/sim', @me, $strResult, PREG_PATTERN_ORDER);@me=$strResult[1][0];{/dede:prenext}
下一篇地址
{dede:prenext get='next' runphp="yes"}preg_match_all('/<a.*?(?: |\\t|\\r|\\n)?href=[\'"]?(.+?)[\'"]?(?:(?: |\\t|\\r|\\n)+.*?)?>(.+?)<\/a.*?>/sim', @me, $strResult, PREG_PATTERN_ORDER);@me=$strResult[1][0];{/dede:prenext}
内容分页
1.分页标签:“{dede:pagebreak/}”,一般是添加在“{dede:field.body/}”标签之后
2.进入系统—系统基本参数—性能选项,选择第二项:是否开启长文章自动分页,选择是即可。
3.发布文章的时候,需要在哪里设置分页,就在“编辑器”里面,选择以下:#P#, 在内容页自动插入文本 “#p#副标题#e#”
4.修改分页样式
修改文件位置:include/arc.archives.class.php找到静态页面分页方法GetPagebreak,即可修改,
默认生成代码模块如:<li><a>共1页:</a><li> <li><a>上一页</a><li> <li><a>1</a><li> <li><a>下一页</a><li>
4.栏目内容页
使用场景:栏目只有一个页面
使用方法:在栏目模板中用{dede:field.content/}调用
5.图片调用方法
1.<a href='[field:arcurl /]'><img src='[field:litpic/]' border='0' width='' height=''></a> 2.[field:imglink /] 3.<a href='[field:arcurl /]'> [field:image/]</a>
说明:
[field:imglink /]与<a href='[field:arcurl /]'>[field:image/]</a> 是完全等价的
在文章内容页加入图片标签:<img src="{dede:field name="litpic"/}" border="0">