I was following this question https://getgrav.org/forum#!/general:group-blog-items-by-year- and I’ve made some tests (I’m newbie with Grav).
After some tests I got the approach working using ‘@taxonomy.category’: with an array of categories as items.
I have several posts on different categories (subdirectories) and I’m showing all those posts on blog page. To achieve that behavior I’ve changed line 2520 on class Grav\Common\Page\Page from:
$results = $taxonomy_map->findTaxonomy($params)->published();
to
$results = $taxonomy_map->findTaxonomy($params, 'or')->published();
So, my questions are:
- Has this approach sense?
- Which is the right way to override a method without changing the core code?