Skip to content

Kirby 6.0.0

$field->excerpt()

Creates an excerpt of the field value without html or any other formatting.

$field->excerpt(int $chars = 0, bool $strip = true, string $rep = ' …'): Field

Parameters

Name Type Default
$chars int 0
$strip bool true
$rep string ' …'

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