Skip to content

Kirby 5.0.4

$field->value()

Returns the field content. If a new value is passed, the modified field will be returned. Otherwise it will return the field value.

$field->value(Closure|string|null $value = null): mixed

Parameters

Name Type Default
$value Closureorstringornull null

Return type

mixed

This method modifies the existing $field object it is applied to and returns it again.

Examples

<?= $page->text()->value() ?>