🚀 A new era: Kirby 4 Get to know
Skip to content

Choices

foreach ($page->fruits()->toChoices() as $fruit) {
    echo $fruit;
}

Choices is a plugin that provides methods to manage field options in the frontend. For any field – like select, multiselect or checkboxlist – that offers options settings in the blueprint, this plugin will load and return the readable text values for the keys stored in the content file. It works with static options directly set in the blueprint as well as dynamic ones loaded via query or api settings.

Related plugins

Other plugins by hana+nils

Colors

by hana+nils

Colors is a field that allows the selection of a color using the native color selector. Colors can be viewed and edited in either HEX, RGB …
  • K3
  • K4
$page
  ->date()
  ->toDateTime()
  ->modify('+1 month')
  ->format('Y-m-d');

Date Methods

by hana+nils

Date Methods is a plugin that allows for advanced date and time parsing and formatting using PHP's core date objects. It offers methods for …
  • K3
  • K4
// using the username
$users->toList();

// using the page title
$pages->toList();

// using the filename
$files->toList();

List Methods

by hana+nils

List Methods is a plugin providing methods to generate comma-separated list from collections like pages, users or files. It allows for …
  • K3
  • K4
site
└ methods
  └ file.php
  └ page.php
  └ site.php
  └ user.php

Methods Folder

by hana+nils

Methods Folder is a plugin to automatically register local methods provided in the folder site/methods just like Kirby accepts local …
  • K3
  • K4
snippetWhen('article', $category->isNotEmpty())

snippetWhen Helper

by hana+nils

snippetWhen is a helper function to conditionally embed snippets.
  • K3
  • K4

Structure: Textarea Preview

by hana+nils

Structure: Textarea Preview offers Markdown previews for textareas in structure fields.
  • K3
  • K4

Tiles

by hana+nils

Tiles is a plugin to serve basic vector map tiles (.mbtiles). The plugin provides routes for styles, tilejson and vector tiles that can be …
  • K3
  • K4
<?php foreach ($notifications as $notification): ?>
  <li>
    <?= $notification
      ->track()
      ->toReference()
      ->title() ?>
  </li>
<?php endforeach ?>

Tracker

by hana+nils

Tracker is a plugin to track content changes and create panel logs or front-end notifications in member areas.
  • K3
<?= $page->text()->toTree()->level(3) ?>

Tree Methods

by hana+nils

Tree Methods converts field values to HTML and helps adapting the resulting markup by changing headline hierarchy, wrapping and filtering …
  • K3
  • K4
$object->isPage();
$object->isUser();
$object->isFile();
$page->isType('article');

Type Methods

by hana+nils

Type Methods is a plugin helping to identify the type of an object, either page, user or file, in order to simplify logic in snippets that …
  • K3
  • K4

Typographer

by hana+nils

Typographer is a plugin for Kirby 3 to apply microtypographic rules to texts, setting opening and closing quotes (primary and secondary), …
  • K3

XSLT Templates

by hana+nils

Template component for XSLT support in your templates. It let's you specify the needed data for each blueprint which is then provided as …
  • K3