davidhellmann / existential
A simple Craft 3 plugin which adds a Twig filter for checking whether a file exists
Installs: 78
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2024-05-12 07:06:16 UTC
README
Check whether a file exists
Existential Overview
A simple Craft 3 plugin which adds a Twig filter for checking whether a file exists
For the Craft 2 version see https://github.com/moresoda/existential/tree/craft2/master [https://github.com/moresoda/existential/tree/craft2/master]
Configuring Existential
No configuration is necessary
Using Existential
Use it like this, {% if asset.getUrl() | fileExists %}
The plugin will return 'true' if the file exists and 'false' if otherwise.
Existential Roadmap
Some things to do, and ideas for potential features:
- Release it
- Have a beer
Brought to you by Pete Eveleigh