DedeCMS article Content page pagination There are too many pages and pages of the content will be displayed on the webpage, which is very ugly. Many webmasters have encountered this situation, as shown in the following figure:
This is not beautiful, so we can make the page only display, and each page only displays the front and back of the current page. The following method is used.
Open the file include/arc.archives.class.php
Find code:
for($i=1;$i<=$totalPage;$i++)
Note: There are two places in total, and the second place is changed.
Replace the above code with:
$total_list=8;
if($nowPage >= $total_list) {
$i = $nowPage-4; // Show 4 pages
$total_list = $nowPage+4; // Show 4 pages
if($total_list >= $totalPage) $total_list = $totalPage;
}
else
{
$i=1;
if($total_list >= $totalPage) $total_list = $totalPage;
}
for($i;$i<=$total_list;$i++)
Save the changes and upload them to generate the updated document HTML.
The paging effect of the modified content page is as follows:
Statement: All articles on this site, unless otherwise specified or marked, are originally published on this site. No individual or organization is allowed to copy, embezzle, collect and publish the content of this website to any website, book and other media platforms without the consent of this website. If the content of this website infringes upon the legitimate rights and interests of the original author, please contact us for handling.