Dede cms 列表页翻页按钮使用的是{dede:pagelist listitem="index,end,pre,next,pageno" listsize="10"/}生成html后列表页第一页是 li 首页/li li class="thisclass"1/li lia href='news_2.html'2/a/li lia href='news_3.html'3/a/li lia href='news_2.html' […]
Dedecms列表页翻页按钮使用的是{dede:pagelist listitem="index,end,pre,next,pageno" listsize="10"/}生成html后列表页第一页是
<li >首页</li>
<li class="thisclass">1</li>
<li><a href='news_2.html'>2</a></li>
<li><a href='news_3.html'>3</a></li>
<li><a href='news_2.html'>下一页</a></li>
<li><a href='news_3.html'>末页</a></li>
最后一页是:
<li><a href='news_1.html'>首页</a></li>
<li><a href='news_2.html'>上一页</a></li>
<li><a href='news_1.html'>1</a></li>
<li><a href='news_2.html'>2</a></li>
<li class="thisclass">3</li>
<li >末页</li>
.58pic_pages{
}
.58pic_pages ul{
float:left;
padding:12px 0px 12px 16px;
}
.58pic_pages ul li{
float:left;
font-family:Tahoma;
line-height:17px;
margin-right:6px;
border:1px solid #E9E9E9;
}
.58pic_pages ul li a{
float:left;
padding:2px 4px 2px;
color:#555;
display:block;
}
.58pic_pages ul li a:hover{
color:#690;
text-decoration:none;
padding:2px 4px 2px;
}
.58pic_pages ul li.thisclass,
.58pic_pages ul li.thisclass a,.pagebox ul li.thisclass a:hover{
background-color:#F8F8F8;
padding:2px 4px 2px;
font-weight:bold;
}
.58pic_pages ul{
}
.58pic_pages ul li{
float:left;
height:18px;
line-height:18px;
padding:4px 10px;
margin-right:5px;
border:1px #b9cdff solid;
}
.58pic_pages .thisclass{
background:#e3ebfe;
}
//获得上一页和主页的链接
if($this->PageNo != 1)
{
$prepage.="<li><a href='".str_replace("{page}",$prepagenum,$tnamerule)."'>上一页</a></li>rn";
$indexpage="<li><a href='".str_replace("{page}",1,$tnamerule)."'>首页</a></li>rn";
}
else
{
$indexpage="<li >首页</li>rn";
}
//下一页,未页的链接
if($this->PageNo!=$totalpage && $totalpage>1)
{
$nextpage.="<li><a href='".str_replace("{page}",$nextpagenum,$tnamerule)."'>下一页</a></li>rn";
$endpage="<li><a href='".str_replace("{page}",$totalpage,$tnamerule)."'>末页</a></li>rn";
}
else
{
$endpage="<li >末页</li>rn";
}
分别修改$indexpage="<li >首页</li>rn";$endpage="<li >末页</li>rn";为$indexpage="<li class="thisclass">首页</li>rn";$endpage="<li class="thisclass">末页</li>rn";修改好之后{dede:pagelist listitem="index,end,pre,next,pageno" listsize="10"/}生成的html代码如下:
<li class="thisclass">首页</li>
<li class="thisclass">1</li>
<li><a href='news_2.html'>2</a></li>
<li><a href='news_3.html'>3</a></li>
<li><a href='news_2.html'>下一页</a></li>
<li><a href='news_3.html'>末页</a></li>