Filter by blueprint

Would it be possible to add blueprint as a possible way to filter things?


kirby()->site()->index()->filterBy('template', 'product');

doesn’t work if the page has a product blueprint but uses default.php as a template.


kirby()->site()->index()->filterBy('blueprint', 'product');

Doesn’t do anything but it would be nice if it did.

I now have to add redundant templates that do the same as default.php because otherwise I can’t filter pages that have a different blueprint.

The Kirby core (kirby folder) doesn’t know anything about blueprints from the Panel, but your use-case is covered by “intended templates” (the template set in the text file name):

kirby()->site()->index()->filterBy('intendedTemplate', 'product');

Ah great, exactly what I needed. Thank you very much.