Hi
My content folderstructure is:
dishes
vorspeisen
salat
suppe_kuerbis
hauptspeisen
schnitzel_vom_rind
fisch_von_der_dorade
...
In my blueprint for dish (salat, suppe_kuerbis, schnitzel_vom_rind, …) is:
tags:
label: Tags
type: checkboxes
options:
vegetarisch: Vegetarisch
fuerKinder: Für Kinder
...
On the frontpage I wanna output the real text of the tag instead its value.
I iterates through all “dishcategories” (vorspeisen, hauptspeisen, …) like this:
<?php foreach ($page->children() as $category): ?>
...
In each “dishcategory” I iterate through all dishes like this:
<?php foreach ($category->children()->listed() as $item): ?>
...
To output the tags of the subpage(s) I use this:
<?= $item->tags() ?>
But it results in for example “fuerKinder” instead of “Für Kinder”.
I tried to access the blueprint of the subpage like this:
(found it in the documentation here)
$field = $page->blueprint()->field('tags');
$value = $page->tags()->value();
dump($field['options'][$value] ?? $value);
But the dump is empty.
What do I do wrong?
Kind regards
Alain