nystudio107 / craft-emptycoalesce
Empty Coalesce adds the ??? operator to Twig that will return the first thing that is defined, not null, and not empty.
Fund package maintenance!
khalwat
Installs: 129 468
Dependents: 3
Suggesters: 0
Security: 0
Stars: 27
Watchers: 4
Forks: 2
Type:craft-plugin
Requires
- php: ^8.2
- craftcms/cms: ^5.0.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
- craftcms/rector: dev-main
This package is auto-updated.
Last update: 2024-11-24 00:32:25 UTC
README
Empty Coalesce plugin for Craft CMS 5.x
Empty Coalesce adds the ??? operator to Twig that will return the first thing that is defined, not null, and not empty.
Requirements
This plugin requires Craft CMS 5.0.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require nystudio107/craft-emptycoalesce
-
Install the plugin via
./craft install/plugin empty-coalesce
via the CLI, or in the Control Panel, go to Settings → Plugins and click the “Install” button for Empty Coalesce.
You can also install Empty Coalesce via the Plugin Store in the Craft Control Panel.
Documentation
Click here -> Empty Coalesce Documentation
Empty Coalesce Roadmap
Some things to do, and ideas for potential features:
- Submit a PR to the Twig project to get it into core
Brought to you by nystudio107