Home > CMS Tutorial > DEDECMS > body text

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

藏色散人
Release: 2019-12-02 09:35:57
Original
1608 people have browsed it

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]; 
}
Copy after login

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

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

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

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

//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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!