Mecha CMS

Add extra functionality to the core engine.


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

List all pages in the current folder filtered by time.

Download Stable Version Download Development Version

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

v1.1.0296 Downloads
v1.0.1213 Downloads

This extension activates the time filter feature by utilizing the time property of the page to add several routes such as on every page to allow users to list all pages in the current folder by time.

As a note, every time you want to link a page to a specific year-based archive, be sure to add the pagination offset to the end of the URL to prevent Mecha from mistakenly interpret the archive year as pagination offset: ✘ ✔

Other than that are safe enough, even though I would prefer you to add it anyway, for consistency:


A global variable $archive will be available in archives page mode. This variable is an instance of the Time class which you can use to get the archive time portion from the URL.


These page conditional statements are available:

  • $site->is('archives') → Return true if current items view is an archives view and is not empty.


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

  • is:archives → Will be added if current items view is an archives view and is not empty.