A simple search module for ProcessWire.
SimpleSearch is a ProcessWire module that provides basic search functionality for your ProcessWire-powered website. It allows users to search for content based on specified criteria and presents the results in an organized manner.
- Basic search functionality.
- Category-based searching.
- Pagination for search results.
- Customizable search criteria and result markup.
- Download the latest release from the GitHub releases page.
- Extract the contents of the ZIP archive to your ProcessWire site's
site/modules/
directory. - Log in to your ProcessWire admin and navigate to the Modules area.
- Find "SimpleSearch" in the list and click "Install."
Adjust the module settings in the ProcessWire admin:
- Log in to your ProcessWire admin.
- Navigate to Setup > Modules > Site > SimpleSearch.
- Modify the settings under the "Configuration" tab according to your requirements.
- Create a template to handle search requests, for example,
search.php
. - Use the following code in your search template to integrate SimpleSearch:
<?php namespace ProcessWire;
$simpleSearch = $modules->get('SimpleSearch');
$simpleSearch->handleSearch();
?>
<!-- Your HTML and search form code here -->
<div id="criteria" class="text-gray-400 py-2 inline-block">
<?= $simpleSearch->render_CriteriaMarkup(); ?>
</div>
<div id="paginationstring">
<!-- <?php echo $simpleSearch->renderPaginationString(); ?> -->
</div>
<div id="overview">
<?= $simpleSearch->render_OverviewMarkup(); ?>
</div>
<div id="search-results">
<ul>
<?= $simpleSearch->render_ResultsMarkup(); ?>
</ul>
</div>
<div id="pagination">
<?php echo $simpleSearch->__render_PaginationMarkup(); ?>
</div>