织梦修改搜索页面的分页样式
2014-11-19 10:08
267 查看
在arc.searchview.class.php中,找到GetPageListDM个方法。
如下修改:红色为原来语句,绿色为修改后语句,将其修改为需要修改的样式即可。
如下修改:红色为原来语句,绿色为修改后语句,将其修改为需要修改的样式即可。
function GetPageListDM($list_len) { global $oldkeyword; $prepage=""; $nextpage=""; $prepagenum = $this->PageNo - 1; $nextpagenum = $this->PageNo + 1; if($list_len=="" || preg_match("/[^0-9]/", $list_len)) { $list_len=3; } $totalpage = ceil($this->TotalResult / $this->PageSize); if($totalpage<=1 && $this->TotalResult>0) { return "共1页/".$this->TotalResult."条记录"; } if($this->TotalResult == 0) { return "共0页/".$this->TotalResult."条记录"; } $purl = $this->GetCurUrl(); $oldkeyword = (empty($oldkeyword) ? $this->Keyword : $oldkeyword); //当结果超过限制时,重设结果页数 if($this->TotalResult > $this->SearchMaxRc) { $totalpage = ceil($this->SearchMaxRc/$this->PageSize); } <strong><span style="color:#FF0000;">/* $infos = "<td>共找到<b>".$this->TotalResult."</b>条记录/最大显示<b>{$totalpage}</b>页 </td>\r\n"; */</span></strong> <span style="color:#009900;"><strong>$infos = "<span>共找到<b>".$this->TotalResult."</b>条记录/最大显示<b>{$totalpage}</b>页 </span>\r\n";</strong></span> $geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType; $hidenform = "<input type='hidden' name='keyword' value='".rawurldecode($oldkeyword)."'>\r\n"; $geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy; $hidenform .= "<input type='hidden' name='channeltype' value='".$this->ChannelType."'>\r\n"; $hidenform .= "<input type='hidden' name='orderby' value='".$this->OrderBy."'>\r\n"; $geturl .= "&kwtype=".$this->KType."&pagesize=".$this->PageSize; $hidenform .= "<input type='hidden' name='kwtype' value='".$this->KType."'>\r\n"; $hidenform .= "<input type='hidden' name='pagesize' value='".$this->PageSize."'>\r\n"; $geturl .= "&typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&"; $hidenform .= "<input type='hidden' name='typeid' value='".$this->TypeID."'>\r\n"; $hidenform .= "<input type='hidden' name='TotalResult' value='".$this->TotalResult."'>\r\n"; $purl .= "?".$geturl; //获得上一页和下一页的链接 <strong><span style="color:#FF0000;"> /* if($this->PageNo != 1) { $prepage.="<td width='50'><a href='".$purl."PageNo=$prepagenum'>上一页</a></td>\r\n"; $indexpage="<td width='30'><a href='".$purl."PageNo=1'>首页</a></td>\r\n"; } else { $indexpage="<td width='30'>首页</td>\r\n"; } if($this->PageNo!=$totalpage && $totalpage>1) { $nextpage.="<td width='50'><a href='".$purl."PageNo=$nextpagenum'>下一页</a></td>\r\n"; $endpage="<td width='30'><a href='".$purl."PageNo=$totalpage'>末页</a></td>\r\n"; } else { $endpage="<td width='30'>末页</td>\r\n"; } */</span></strong> <span style="color:#009900;"><strong> if($this->PageNo != 1) { $prepage.="<a href='".$purl."PageNo=$prepagenum'>上一页</a>\r\n"; $indexpage="<a href='".$purl."PageNo=1'>首页</a>\r\n"; } else { $indexpage="<span width='30'>首页</span>\r\n"; } if($this->PageNo!=$totalpage && $totalpage>1) { $nextpage.="<a href='".$purl."PageNo=$nextpagenum'>下一页</a>\r\n"; $endpage="<a href='".$purl."PageNo=$totalpage'>末页</a>\r\n"; } else { $endpage="<span width='30'>末页</span>\r\n"; }</strong></span> //获得数字链接 $listdd=""; $total_list = $list_len * 2 + 1; if($this->PageNo >= $total_list) { $j = $this->PageNo - $list_len; $total_list = $this->PageNo + $list_len; if($total_list > $totalpage) { $total_list = $totalpage; } } else { $j=1; if($total_list > $totalpage) { $total_list = $totalpage; } } for($j; $j<=$total_list; $j++) { if($j == $this->PageNo) { <strong><span style="color:#FF0000;">/* $listdd.= "<td>$j </td>\r\n"; */</span></strong> <span style="color:#009900;"><strong> $listdd.= "<span>$j </span>\r\n"</strong></span>; } else { <strong><span style="color:#FF0000;"> /* $listdd.="<td><a href='".$purl."PageNo=$j'>[".$j."]</a> </td>\r\n"; */</span></strong> <span style="color:#009900;"><strong>$listdd.="<a href='".$purl."PageNo=$j'>".$j."</a> \r\n";</strong></span> } } $plist = "<table border='0' cellpadding='0' cellspacing='0'>\r\n"; $plist .= "<tr align='center' style='font-size:10pt'>\r\n"; $plist .= "<form name='pagelist' action='".$this->GetCurUrl()."'>$hidenform"; $plist .= $infos; $plist .= $indexpage; $plist .= $prepage; $plist .= $listdd; $plist .= $nextpage; $plist .= $endpage; if($totalpage>$total_list) { $plist.="<td width='38'><input type='text' name='PageNo' style='width:28px;height:14px' value='".$this->PageNo."' /></td>\r\n"; $plist.="<td width='30'><input type='submit' name='plistgo' value='GO' style='width:30px;height:22px;font-size:9pt' /></td>\r\n"; } $plist .= "</form>\r\n</tr>\r\n</table>\r\n"; return $plist; }
相关文章推荐
- DedeCMS_织梦_如何修改织梦内容页和列表页Pagelist分页样式?
- 织梦默认分页样式修改 解决分页列表显示,去掉li
- 织梦搜索页面的分页
- 织梦默认分页样式修改 解决分页列表显示,去掉li
- 织梦v5.7修改分页样式
- 修改织梦分页标签样式
- 直接修改页面上的样式用li 例子 js另类分页 js分页 javascript
- 修改【列表分页】样式及加入收藏代码
- JSP页面中的菜单 选中后的菜单 样式修改 如何判断选中的菜单
- 使用jquery当页面打开时,将一个事件绑定到控件(同时执行两个事件),并修改加载样式类中的样式
- 三、在rails修改页面样式
- 利用jQuery和css实现的模仿百度搜索列表页面的分页的足迹效果
- 修改页面loading。。。样式
- 织梦搜索时间间隔如何修改
- Launcher功能的修改及添加,本篇是一些小功能的展示,通知栏显隐,dock显隐,屏幕页面跳转,(语音)搜索,等小功能
- Dedecms织梦CMS搜索页面调用全站最新文章的方法
- javascript实现分页及页面的增加删除修改操作
- 常用的一些js方法实例 页面取值 坐标 修改样式 弹层 (1)
- 如何修改DeDe标签Pagelist分页样式详解