New group function in Yellow

· 1 min ·

Since version 0.8.122 of the Core[1] of Yellow, there is the group() function with which pages can be grouped according to their settings and output in an array. You can see what this can be useful for in the archive[2] of this page, for example.

This is what maintainer Mark wrote on GitHub, for the specific example of an archive like mine:

The method pages->group() is available in the Yellow API[3] now, it supports custom date formats[4].

pages->group("published", false, "Y") = group content by publication year with descending date
pages->group("published", false, "Y-m") = group content by publication month with descending date
pages->group("published", false, "Y-m-d") = group content by publication day with descending date


Reply via e-mail

Back to top