Skip to content

Kirby 6.0.0

$fieldMethods->short()

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

$fieldMethods->short(int $length, string $appendix = '…'): FieldMethods

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\FieldMethods

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

Parent class

Kirby\Content\FieldMethods