Using a fieldset with a template (Blade)

Hello!

I am a newbie so forgive me if this is obvious but I search and tried to a point where I give up.

I try to add a fieldset with a template field to add this as a set in a collection. This works as expected. When I output the whole thing the chosen template for the set is ignored.

My goal is to have custom markup for the set, e.g. for a quote.

This is my fieldset "quote":

title: Zitat
fields:
  -
    handle: text
    field:
      placeholder: 'Gib hier ein Zitat ein.'
      input_type: text
      antlers: false
      display: Text
      type: text
      icon: text
      instructions: Zitat
      listable: hidden
      localizable: true
  -
    handle: source
    field:
      input_type: text
      antlers: false
      display: Quellenangabe
      type: text
      icon: text
      instructions: 'Freitext für Quellenangabe. Wenn Link gesetzt ist, wird die Quellenangabe als Linktext verwendet.'
      listable: hidden
  -
    handle: template
    field:
      hide_partials: true
      display: Template
      type: template
      icon: template
      listable: hidden
      validate:
        - required

This is my main template for the collection:

            @foreach($content as $element)
            {!! $element['text'] !!}
            @endforeach

and this is my template for the quote content:

<blockquote cite="{{ $url }}" class="quote-content-container d-flex position-relative">
    <div class="quote-i-container d-flex align-items-center p-3 px-sm-4 pt-sm-4 pb-sm-3">
        <div class="i-quote mx-sm-1"></div>
    </div>
    <div class="quote-text-container flex-fill px-3 px-sm-4 pt-sm-4 pb-2 pb-sm-3">
        {{ $text }}
    </div>
    <div class="text-right">
        <a href="{{$url}}">{{ $source }}</a>
    </div>
</blockquote>

The last part will most likely not working like that but it seems I am not even getting there. The output only shows plain text.

How do I access the set within the content (at the correct place) without rebuilding the whole thing from "raw"?

Any help is highly appreciated!

Thank you Fabio

>>>>>>> Unanswered <<<<<<<
4 Replies
2 Followers