How to access an entry inside a Bard field

I am currently working on a page with a bard field type which shall be used for placing teasers manually. These teasers consist of an entry from my gin collection + a teasertext. However I cannot get to the entries data.

Having read through https://statamic.com/forum/3745-how-to-use-an-entry-of-a-collection-inside-a-bard-set I got to the point to see my available data on the page. The {{ dump }} gives me this:

  "extended_content" => Statamic\Fields\Value {#2355 ▼
    #raw: array:3 [▼
      0 => array:2 [▶]
      1 => array:2 [▼
        "type" => "set"
        "attrs" => array:1 [▼
          "values" => array:3 [▼
            "type" => "bestenliste"
            "teasertext" => "Teasertext aus Feld 1"
            "profil_gin" => "bab96b39-6701-47b5-b54e-a168b7c10604"
          ]
        ]
      ]
      2 => array:2 [▶]
    ]
    #handle: "extended_content"
    #fieldtype: Statamic\Fieldtypes\Bard {#2356 ▶}
    #augmentable: Statamic\Entries\Entry {#2130 ▶}
    #shallow: false

The following code renders the {{ teasertext }} (a simple textarea) but I simply cannot get around to get a hold of the content of the entries. Tried a gazillion foreach and uuid things after reading the previous post but nothing worked for me …

<div class="bardtext">
  {{ extended_content }}
    {{ if type == "bestenliste" }}
    <div class="gin-teaser">

    {{# How do I access the entries' data here, i.e. the title or url #}}

    {{ teasertext }}
    </div>
    {{ /if }}
  {{ /extended_content }}
</div>

Does someone have a hint which magic sauce is needed here? Thanks a lot :)

>>>>>>> Unanswered <<<<<<<
1 Reply
2 Followers