09 |
$pagebreak = str_replace($this->NameFirst, $this->NameFirst. "_" .$pageNo, $arcurl); |
19 |
if ($pageNo>1) $pagebreak = "&pageno=" .$pageNo; |
21 |
if ($cfg_rewrite == 'Y' ) |
25 |
$pagebreak = str_replace( ".php?aid=" , "-" , $arcurl); |
27 |
$pagebreak = preg_replace( "#&pageno=(d+)#i" , '-.html' , $pagebreak); |
31 |
$pagebreak = $arcurl.$pagebreak; |
|
2、获取列表页当前Url 或者 列表页分页Url
打开 /include/arc.listview.class.php 找到
//替换第二页后的内容
在它上面加入
01 |
$this->Fields[ 'itemcururl' ] = $this->GetItemsCurUrl($PageNo); |
11 |
function GetItemsCurUrl($PageNo) |
17 |
if ($this->TypeLink->TypeInfos[ 'isdefault' ]==-1) |
21 |
$purl = $this->GetCurUrl(); |
23 |
if ($cfg_rewrite == 'Y' ) |
27 |
$nowurls = preg_replace( "/-/" , ".php?" , $purl); |
29 |
$nowurls = explode( "?" , $nowurls); |
39 |
$geturl = "tid=" .$this->TypeID; |
49 |
$geturl = "tid=" .$this->TypeID. "&TotalResult=" .$this->TotalResult. "&" ; |
51 |
$purl .= '?' .$geturl. "PageNo=" .$PageNo; |
61 |
$tnamerule = $this->GetMakeFileRule($this->Fields[ 'id' ], "list" ,$this->
Fields[ 'typedir' ],$this->Fields[ 'defaultname' ],$this->Fields[ 'namerule2' ]); |
63 |
$tnamerule = preg_replace( "/^(.*)//" , '' , $tnamerule); |
65 |
$cfg_basehost = preg_replace( '#/$#' , '' ,$cfg_basehost); |
67 |
$tnamerule = MfTypedir($this->Fields[ 'typedir' ]). '/' .$tnamerule; |
73 |
$purl = MfTypedir($this->Fields[ 'typedir' ]). '/' ; |
81 |
$purl = str_replace( "{page}" ,$PageNo,$tnamerule); |
93 |
还需要打开 /include/arc.partview.class.php 找到 |
95 |
$this->Fields[ 'title' ] = $this->TypeLink->GetPositionLink( false ); |
99 |
$this->Fields[ 'itemcururl' ] = $this->TypeLink->GetOneTypeUrl($this->TypeLink->TypeInfos); |
|
前台模板标签调用
{dede:field.itemcururl runphp=yes}global $cfg_basehost;@me = (@me == '' ? "{$cfg_basehost}" : "{$cfg_basehost}@me");{/dede:field.itemcururl}