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!