`

织梦 搜索页自定义显示的页数

阅读更多

首先找到 “include” 文件夹下的 arc.searchview.class.php 文件

 

在140 到145之间的这段代码

 

        if($this->PageSize=="")
        {
            $this->PageSize = 20;
        }

 

替换成

		$ctag = $this->dtp->GetTag("page");
		if(!is_object($ctag))
		{
			$ctag = $this->dtp->GetTag("list");
		}
		if(!is_object($ctag)){
			$this->PageSize = 20;
		}else{
			if($ctag->GetAtt("pagesize")!="")
			{
				$this->PageSize = $ctag->GetAtt("pagesize");
			}else{
				$this->PageSize = 20;
			}
		}

 

在 search.htm 写上

<ul>
    {dede:list}
    <li><a target="_blank">[field:title/]</a></li>
    {/dede:list}
</ul>
{dede:pagelist listsize='4'/}

 

 

  • 大小: 27.5 KB
  • 大小: 17.9 KB
1
1
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics