Agnostic Fetch
The code to fetch the elements from a Craft Element Query is different when the elements have been eager-loaded. For example, to get the first element of a non eagerly loaded field, someField.one()
, but for an eagerly loaded field, someField[0]
(and that doesn't even get into the error checking). With Agnostic Fetch, you can do someField | one
(or one(someField)
or craft.agnosticfetch.one(someField)
).
The Agnostic Fetch functions are available as twig filters, as twig functions, and as craft variables.
Installation Instructions
To install this plugin, copy the command above to your terminal.
Reviews
This plugin doesn't have any reviews.
Active Installs
71
License
MIT
Last release
February 4, 2019
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs