Query language in templates

Say I have a query for page images stored in a string, e. g. page.images.filter('template', 'cover'). Is there a way to evaluate this query in a template? Like $images = kirby()->query(myQuery), returning a collection of images.

I just found this: Input query language in Panel, parse in template

1 Like

you could create a page method for

you need to forward the query sting and the current page (aka $this inside the pagemethod) to the static method str::template.

or a site method and forward the kirby and site object.