dedecms织梦搜索页面分页样式修改方法?

1:搜索模板里面的分页标签pagelist和普通的分页不一样,常见的分页控制代码都写在include/arc.listview.class.php里面,而现在不是了,搜索页的分页是写在include/arc.searchview.class.php里面。如果需要到二次开发的可以到里面进行修改。
2:而默认的搜索页分页样式就比较复杂,里面加了很多冗余代码,生成后会初夏下面这段代码:
<table border='0' cellpadding='0' cellspacing='0'>
<tr align='center' style='font-size:10pt'>
<form name='pagelist' action='/plus/search.php'><input type='hidden' name='keyword' value=''>
<input type='hidden' name='channeltype' value='0'>
<input type='hidden' name='orderby' value=''>
<input type='hidden' name='kwtype' value='0'>
<input type='hidden' name='pagesize' value='10'>
<input type='hidden' name='typeid' value='0'>
<input type='hidden' name='totalresult' value='57'> <td>共找到<b>57</b>条记录/最大显示<b>6</b>页 </td>
<td width='30'>首页</td>
<td>1&nbsp;</td>
<td>1&nbsp;</td>
像table完全是不必要存在的,而且对seo也不利,那么怎么办呢?可以在arc.searchview.class.php文件中找到以下几行代码,删掉“<>”方括号及里面的内容即可,
$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";
除此之外,还要删除样式中带有表格信息的代码如:<td width='50'>、<table border='0' cellpadding='0' cellspacing='0'>、<tr align='center' style='font-size:10pt'>、<form name='pagelist' action='".$this->getcururl."'>等,别忘了这些代码都是成对出现的哦,别删了前面后面忘了删。
至此,大致的样式已经清除干净了,其它的地方也就跟修改文章列表页的分页样式差不多。
上一个:网站建设对优化不利的几种做法?
下一个:如何使扁平化网站制作简约而不失单调
松原网站优化,松原关键词优化,松原seo优化,松原seo,松原整站优化,松原seo公司,松原快照优化