Skip to content

Kirby 6.0.0

$field->short()

Cuts the string after the given length and adds "…" if it is longer

$field->short(int $length, string $appendix = '…'): Field

Parameters

Name Type Default Description
$lengthrequired int no default value The number of characters in the string
$appendix string '…' An optional replacement for the missing rest

Return type

Kirby\Content\Field

This method does not modify the existing $field object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Content\Field