https://github.com/bnomei/kirby3-field-ecco
Kirby Field Method to ecco strings based on boolval of Field
https://github.com/bnomei/kirby3-field-ecco
boolean echo kirby-cms kirby-plugin
Last synced: 7 months ago
JSON representation
Kirby Field Method to ecco strings based on boolval of Field
- Host: GitHub
- URL: https://github.com/bnomei/kirby3-field-ecco
- Owner: bnomei
- License: mit
- Archived: true
- Created: 2018-08-09T10:16:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-29T19:19:29.000Z (12 months ago)
- Last Synced: 2025-02-14T20:05:30.201Z (9 months ago)
- Topics: boolean, echo, kirby-cms, kirby-plugin
- Language: PHP
- Homepage:
- Size: 1.73 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
> [!TIP]
> This plugin has been merged with Janitor.
# Kirby Field Ecco


[](https://twitter.com/bnomei)
Kirby Field Method to ecco strings based on boolval/isEmpty of a Field.
## Installation
- unzip [master.zip](https://github.com/bnomei/kirby3-field-ecco/archive/master.zip) as folder `site/plugins/kirby3-field-ecco` or
- `git submodule add https://github.com/bnomei/kirby3-field-ecco.git site/plugins/kirby3-field-ecco` or
- `composer require bnomei/kirby3-field-ecco`
## Usage
in php code
```php
echo $page->myBoolField()->ecco('Yes please. 👍', 'OMG NO! 👎');
echo $page->selectField()->ecco('has a value', 'is empty');
```
or in blueprint template language
```yml
{{ page.myBoolField.ecco('Yes please. 👍', 'OMG NO! 👎') }}
{{ page.selectField.ecco('has a value', 'is empty') }}
```
## Disclaimer
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please [create a new issue](https://github.com/bnomei/kirby3-field-ecco/issues/new).
## License
[MIT](https://opensource.org/licenses/MIT)
It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.