Skip to content

Commit

Permalink
docs: update headless field methods page
Browse files Browse the repository at this point in the history
  • Loading branch information
johannschopplich committed Aug 8, 2024
1 parent 997ad16 commit 1159842
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/1.docs/3.headless/3.field-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ return [
'blocksResolver' => [
'resolvers' => [
// Resolve the field `link` of the block `intro` to a custom output
'intro:link' => fn ($field, $block) => [
'intro:link' => fn (Field $field, Block $block) => [
'value' => $field->value(),
'uri' => $field->toPage()?->uri()
]
// Resolve the KirbyText of the field `text` of the `note` block
'note:text' => function ($field, $block) {
'note:text' => function (Field $field, Block $block) {
return $field->kirbytext()->value()
}
]
Expand Down

0 comments on commit 1159842

Please sign in to comment.