Skip to content

Kirby 6.0.0

$field->replace()

It parses any queries found in the field value.

$field->replace(array $data = [], string|null $fallback = ''): Field

Parameters

Name Type Default Description
$data array []
$fallback stringornull '' Fallback for tokens in the template that cannot be replaced (null to keep the original token)

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