Download the PHP package scottboms/events-field without Composer
On this page you can find all versions of the php package scottboms/events-field. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download scottboms/events-field
More information about scottboms/events-field
Files in scottboms/events-field
Package events-field
Short Description Events Field plugin for Kirby
License MIT
Homepage https://github.com/scottboms/kirby-events-field
Informations about the package events-field
Events Field plugin for Kirby
Adds a customizable Event Field Type for Kirby.
Installation
Kirby CLI
Git submodule
Copy and Paste
- Download the contents of this repository as Zip file.
- Rename the extracted folder to
kirby-eventsand copy it into thesite/plugins/directory in your Kirby project.
Usage
Blueprint Configuration
In a Page blueprint, add a new field with the type event. Standard field attributes such as label, required, help, etc. can also be used to override defaults. Use empty to change the text displayed when the field is in an empty state.
Field Properties
| Name | Type | Default | Description |
|---|---|---|---|
| empty | string | null |
The placeholder text if no information has been added |
| preview | array | [ ] |
Optional array of field names to display in the preview |
| eventName | boolean | true |
If true, the field is available in the form |
| endDate | boolean | true |
If true, the field is available in the form |
| timeStart | boolean | true |
If true, the field is available in the form |
| timeEnd | boolean | true |
If true, the field is available in the form |
| city | boolean | true |
If true, the field is available in the form |
| state | boolean | true |
If true, the field is available in the form |
| country | boolean | true |
If true, the field is available in the form |
| venue | boolean | true |
If true, the field is available in the form |
| url | boolean | true |
If true, the field is available in the form |
| details | boolean | true |
If true, the field is available in the form |
Templates and Snippets
To access an event field in your templates, you can use the toEvent() method.
Field Methods
Special Field Methods have been included to provide additional utility when utilizing the field. These include a toEvent() wrapper which behaves similarly to Kirby's native toStructure() method. Additionally, a daysUntil() method allows you to provide a simple countdown based on the field's startDate value.
Compatibility
- Kirby 4.x
- Kirby 5.x
Disclaimer
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test before using it in a production environment. If you identify an issue, typo, etc, please create a new issue so I can investigate.