Modify DEDECMS search results show only 10 solutions

Source: Internet
Author: User
Keywords Search results Dedecms

Today to modify the DEDECMS search results, found that when "> users use the DEDECMS default search, showing only 10 search results, If the results of the search more, users need to read a lot of pages to find the information they need!

To improve the user experience we will make a few small changes can be done!

Dedecms Although there is a search template page, but does not control the number of search results displayed, by entering the keyword, we found that the search using the PHP program is:

We directly modify the code for line 5th of the search.php file:


$pagesize = (isset ($pagesize) && is_numeric ($pagesize))? $pagesize: 10;

Modified to:

$pagesize = (isset ($pagesize) && is_numeric ($pagesize))? $pagesize: 20;

Let's see if the search results show 20 per page! Success! You can modify the parameters of $pagesize:20 according to your own needs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.