Filter pages by template seems not to work as documented

Hi, I was just trying to use the

filterBy("template", "in", ['home', 'default'])

method to filter pages.

But it only works when I use intendedTemplate instead:

filterBy("intendedTemplate", "in", ['home', 'default']).

Is the documentation (Query language | Kirby CMS) outdated or am I doing something wrong?

What is the result you expected from this query vs. what you actually got?
And which Kirby 5 version did you test with?

I used the latest 5.2.3 Kirby version.

When I use intendedTemplate I get all the pages that match one of the given template names. When I use template I get no results at all.

Well, the example from the docs works for me in a 5.2.3 Starterkit. So maybe the templates do not exist in your installation.

Hmm, weird. The templates do exist. And it does work with the intendedTemplates. Thanks for checking! Must be something else apparently.