如何给织梦文章分页标题加上序号呢
经过研究我们发现织梦模板文章分页所需要的文件是arc.archives.class.php,
所以我们可以通过添加I.句代码,为织梦模板文章分页标题加上序号.下面是具体
更多精彩就在: 51免费论文网|www.jxszl.com
操作过程:
修改文件:/include/arc.archives.class.php
行数:大约IIIIVVII行(行数可能由于更新有变化)
修改代码如下:
//循环生成HTML文件
else
{
for($i=I.;$i<=$this->TotalPage;$i++)
{
$tempTitle=$this->Fields[title];//临时存储I.个标题副本
if($i>I.)
{
$truefilename=$this->GetTruePath().$fileFirst."_".$i.".".$this->ShortName;
//为分页标题加上序号.II00IX.II.I.III
$this->Fields[title]=$this->Fields[title].(.$i.);//在标题后面多加个序号
}
else
{
$truefilename=$this->GetTruePath().$filename;
}
$this->ParseDMFields($i,I.);
$this->dtp->SaveTo($truefilename);
$this->Fields[title]=$tempTitle;//生成html,还原标题
}
}
原文链接:http://www.jxszl.com/biancheng/dedecms/74657.html