mirror of
https://github.com/getgrav/grav.git
synced 2026-07-07 01:29:26 +02:00
Added dateRange support to @ Collection definitions
This commit is contained in:
@@ -1385,6 +1385,12 @@ class Page
|
||||
}
|
||||
// TODO: END OF MOVE
|
||||
|
||||
if (isset($params['dateRange'])) {
|
||||
$start = isset($params['dateRange']['start']) ? $params['dateRange']['start'] : 0;
|
||||
$end = isset($params['dateRange']['end']) ? $params['dateRange']['end'] : false;
|
||||
$collection->dateRange($start, $end);
|
||||
}
|
||||
|
||||
if (isset($params['order'])) {
|
||||
$by = isset($params['order']['by']) ? $params['order']['by'] : 'default';
|
||||
$dir = isset($params['order']['dir']) ? $params['order']['dir'] : 'asc';
|
||||
|
||||
Reference in New Issue
Block a user