Mecha CMS

Add extra functionality to the core engine.

Search

Table of Contents
  1. Usage 
  2. Conditions 
  3. Classes 

Find files by query.

Download Stable Version Download Development Version

Something looks broken? We accept bounties to fix them faster.

^39 Downloads
v1.2.364 Downloads
v1.2.229 Downloads
v1.2.128 Downloads
v1.2.030 Downloads
v1.0.528 Downloads

Usage 

Append ?q=search+query to the pages URL to search pages by file name or file content.

Add this snippet just before the </header> in header.php file of your active layout to add the default search form:

<?= self::form('search'); ?>

Conditions 

These page conditional statements are available to quickly determine the type of page we are currently in:

  • $site->is('search') → Return true if current page is a search results page.

Classes 

These HTML classes will be added to the <html> element that has a class attribute:

  • is:search → Will be added on search results page.