Home > Article > CMS Tutorial > dedecms adds search functionality to the website
The code to add the search function is as follows:
(Related recommendations: dede tutorial)
Just put the above code into the corresponding website template. Generally speaking, the search code of Dedecms is placed in the top template to facilitate the whole site call.
After adding it, you can adjust the css style and website layout according to the website style. It depends on personal preferences and the theme of the website. For the search website result list page template, search.htm is the default template in the templets/default template.
If it is a new dede search result, without using the default template, how to add the search function to dede is as follows:
Create a new search.htm template and put it into our custom template file folder, (used to display search results) and then the code is called. Just add a call tag where you want to display search results.
The list call label is:
{dede:list perpage='4'}{/dede:list}
The underlying call field is the same as the call field on the homepage and list page.
The above is the detailed content of dedecms adds search functionality to the website. For more information, please follow other related articles on the PHP Chinese website!