Skip to content

Releases: hananils/kirby-list-methods

Version 2.2.1: Empty items

16 Feb 11:44
Compare
Choose a tag to compare
  • removes empty items from list
  • trims values before joining them

Version 2.2.0: Content Methods

16 Feb 10:11
Compare
Choose a tag to compare

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

28 Feb 12:36
Compare
Choose a tag to compare
  • Adds toNumericList() methods and numericList() helper to format numeric lists list years.

Version 2.0.1: Fix Composer

20 Jan 11:48
3db8ffb
Compare
Choose a tag to compare
  • Fix name in composer.json

Version 2.0.0: Lists

17 Nov 11:04
Compare
Choose a tag to compare
  • Fixes Choices compatibility
  • Improves docs

Version 1.0.0

23 Jun 07:31
Compare
Choose a tag to compare

Initial release.