Home >CMS Tutorial >DEDECMS >How to use the DEDECMS Dreamweaver template to turn pages by clicking on the picture in the album

How to use the DEDECMS Dreamweaver template to turn pages by clicking on the picture in the album

藏色散人
藏色散人Original
2019-12-02 09:35:571650browse

How to use the DEDECMS Dreamweaver template to turn pages by clicking on the picture in the album

DEDECMS Dreamweaver template How to realize page turning by clicking on the picture in the album?

1. In order to implement this function, we first need to obtain the current page number and total page number of the image page

Edit the include/inc_archives_view.php file

Recommended learning: Dreamweavercms

(1) Find function ParseDMFields and modify it to:

function ParseDMFields($pageNo,$ismake=1) 
{ 
$this->NowPage = $pageNo; 
//获得当前页面编号 
$this->Fields['cpagenum'] = $this->NowPage; 
if($this->SplitPageField!="" && 
isset($this->Fields[$this->SplitPageField])) 
{ 
$this->Fields[$this->SplitPageField] = $this->SplitFields[$pageNo - 1]; 
}

Note that the following code has been added to obtain the current page number:

$this->Fields['cpagenum'] = $this->NowPage;

(2) Find the function __construct constructor and modify it to:

$this->TotalPage = count($this->SplitFields); 
}

//Get the total number of current pages

The above is the detailed content of How to use the DEDECMS Dreamweaver template to turn pages by clicking on the picture in the album. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn