Releases: hananils/kirby-list-methods
Releases · hananils/kirby-list-methods
Version 2.2.1: Empty items
- removes empty items from list
- trims values before joining them
Version 2.2.0: Content Methods
When dealing with a single page or user, there are new methods to generate lists from content field:
// Given the fields name and job, creates "Jane Doe, astrophysicist"
echo $user->asList(['name', 'job']);
// Given the fields start and end, creates "2020–2023"
echo $page->asNumericList(['start', 'end']);
Both methods, asList
and asNumericList
, support setting a custom conjunction via a secondary attribute:
// Given the fields name and job, creates "Jane Doe: astrophysicist"
echo $page->asList(['name', 'job'], ': ');
Full Changelog: 2.1.0...2.2.0
Version 2.1.0: Numeric lists
- Adds
toNumericList()
methods andnumericList()
helper to format numeric lists list years.
Version 2.0.1: Fix Composer
- Fix name in
composer.json
Version 2.0.0: Lists
- Fixes Choices compatibility
- Improves docs
Version 1.0.0
Initial release.