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:

 Dream Weaving DedeCMS article has too many pages, and the method of intelligent display of page numbers

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:

 Dream Weaving DedeCMS article has too many pages, and the method of intelligent display of page numbers

Post reply

Can't comment until