Mecha CMS

Add extra functionality to the core engine.

Search

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

Find files by query.

Download Version 1.2.1 Download Development Version

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

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.