1、打开专题内容模板 \templets\default\article_spec.htm 找到
{dede:field.note/}
在它的上面加入
<script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script> <script type="text/javascript"> function multi(pagenum,tagid) { var taget_obj = document.getElementById(tagid); var taget_obj_page = document.getElementById("page_"+tagid); myajax = new DedeAjax(taget_obj,false,false,'','',''); myajax.SendGet2("/plus/arcmulti.php?mtype=0&pnum="+pagenum+'&tagid='+tagid); myajax = new DedeAjax(taget_obj_page,false,false,'','',''); myajax.SendGet2("/plus/arcmulti.php?mtype=1&pnum="+pagenum+'&tagid='+tagid); DedeXHTTP = null; } </script>
注意:/include/dedeajax2.js 和 /plus/arcmulti.php 必须存在
2、打开 \templets\system\channel_spec_note.htm 找到
<dl class="tbox"> <dt><strong>~notename~</strong></dt> <dd> <ul class="d1 ico3"> ~spec_arclist~ </ul> </dd> </dl>
在需要显示分页的地方加入
<dd> ~noteid~ </dd>
像我上图那样的分页的话
3、打开 \include\taglib\arcpagelist.lib.php 找到
function lib_arcpagelist(&$ctag, &$refObj)
改成
function lib_arcpagelist(&$ctag, &$refObj, &$tagid)
4、打开 \include\taglib\channel\specialtopic.lib.php 找到
require_once(DEDEINC.'/taglib/arclist.lib.php');
在它的下面加入
require_once(DEDEINC.'/taglib/arcpagelist.lib.php');
继续找到
$notename = $ctag->GetAtt('name');
在它的下面加入
$noteid = $ctag->GetAtt('noteid');
继续找到
$idvalue = lib_arclistDone
在它的上面加入
$pagesize = $rownum; $idArr = explode(',', $idlist); $rownum = count($idArr)>0 ? count($idArr) : 1000; $order='desc'; $subday=0; $noflag=''; $tagid = $noteid; $isweight = 'N';
继续找到
$ctag->GetAtt('att')
改成
$ctag->GetAtt('att'), $order, $subday, $noflag,$tagid, $pagesize, $isweight
最后找到
$notestr = str_replace('~notename~', $notename, $tempStr);
改成
$arcpagelist = lib_arcpagelist($refObj, $ctag, $tagid); $notestr = str_replace('~notename~', $notename, $tempStr); $notestr = str_replace('~noteid~', $arcpagelist, $notestr);
完成。