List all pages in the current folder filtered by time.
Something looks broken? We accept bounties to fix them faster.
This extension activates the time filter feature by utilizing the
time property of the page to add several routes such as
https://mecha-cms.com/blog/archive/:archive 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:
https://mecha-cms.com/blog/archive/2020 ✘ https://mecha-cms.com/blog/archive/2020/1 ✔
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:
trueif current items view is an archives view and is not empty.
These HTML classes will be added to the
<html> element that has a
is:archives→ Will be added if current items view is an archives view and is not empty.