https://github.com/nystudio107/craft-emptycoalesce
Empty Coalesce adds the ??? operator to Twig that will return the first thing that is defined, not null, and not empty
https://github.com/nystudio107/craft-emptycoalesce
coalesce coalescing craft-plugin craft3 craftcms empty operator twig
Last synced: 7 months ago
JSON representation
Empty Coalesce adds the ??? operator to Twig that will return the first thing that is defined, not null, and not empty
- Host: GitHub
- URL: https://github.com/nystudio107/craft-emptycoalesce
- Owner: nystudio107
- License: mit
- Created: 2018-06-03T23:34:12.000Z (almost 8 years ago)
- Default Branch: develop-v5
- Last Pushed: 2024-04-13T19:24:02.000Z (about 2 years ago)
- Last Synced: 2024-04-14T08:56:08.206Z (about 2 years ago)
- Topics: coalesce, coalescing, craft-plugin, craft3, craftcms, empty, operator, twig
- Language: PHP
- Homepage: https://nystudio107.com/
- Size: 327 KB
- Stars: 26
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/?branch=v5) [](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/?branch=v5) [](https://scrutinizer-ci.com/g/nystudio107/craft-emptycoalesce/build-status/v5) [](https://scrutinizer-ci.com/code-intelligence)
# 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.
1. Open your terminal and go to your Craft project:
cd /path/to/project
2. Then tell Composer to load the plugin:
composer require nystudio107/craft-emptycoalesce
3. 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](https://nystudio107.com/plugins/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](https://nystudio107.com/)