We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently Grav supports filtering a Page Collection by including specific templates types via Collection::ofType.
I would also like to exclude specific template types from a Page Collection, so I can display the results differently.
This could be achieved via Collection::notOfType. Preferably this new function accepts an Array or List for to remove multiple templates at once.
Collection::notOfType
Acceptance Criteria
Solution
page.collection()|filter(module => module.template != 'modular/links')
modular/links
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently Grav supports filtering a Page Collection by including specific templates types via Collection::ofType.
I would also like to exclude specific template types from a Page Collection, so I can display the results differently.
This could be achieved via
Collection::notOfType
.Preferably this new function accepts an Array or List for to remove multiple templates at once.
Acceptance Criteria
Solution
page.collection()|filter(module => module.template != 'modular/links')
wheremodular/links
is the template to excludeThe text was updated successfully, but these errors were encountered: