修改的办法如下:
打开include目录下的arc.listview.class.php文件,找到Display函数(大约在397行),找到如下代码:
$this->ParseTempletsFirst();
在上方添加以下代码:
if($this->PageNo>1) { $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_article2.htm"; $this->dtp->LoadTemplate($tempfile); }
$this->ParseDMFields($this->PageNo,1);
在这句代码上方添加代码:
if($this->PageNo>1) { $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_article2.htm"; $this->dtp->LoadTemplate($tempfile); $this->ParseTempletsFirst(); }
改成:
$tmpdir = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']; $tempfile = str_replace("{tid}",$this->TypeID,$this->Fields['templist']); $tempfile = str_replace("{cid}",$this->ChannelUnit->ChannelInfos['nid'],$tempfile); $tempfile = $tmpdir."/".$tempfile; $tmpfile2 = substr($tempfile,0,-4); $tempfile = $tmpfile2."2.htm";
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_article2.htm";
现在就会自动去获取列表页模板后面加了2的模板,例如列表页的模板是list_image.htm,那么第二页的模板就是list_image.htm。现在这个问题就完美解决了!
评论前必须登录!
立即登录 注册