Search function for ProcessWire
Download the files
The download is available at the end of this page.
Upload the files
Extract all files and upload the PHP-file into
site/templates/. Upload the CSS-file and the
site/templates/styles/ or in another directory you prefer for CSS-files. Please remember, that you have to link this CSS-file in your markup (
_main.php) by yourself.
Install the templates
Go to Setup->Templates and click "Add New".
Now you will see the
simple-search template file which you just uploaded into
site/templates/. Set the checkmark on this file and click on "Duplicate fields used by another template". In the list below choose "home". Now click on "Add Template".
Create the Search Page
Go to the "Pages". Moving the cursor over the page name (e.g. "Home") will bring up some options. Click on "New".
Now you can link this "search-page" in your navigation and open it. The result can be tested also here.
- Version 1.0: Initial version
- Version 2.0: Some improvements
Categories: ProcessWire CMS PHP