1

I´m currently building a website with Bolt as a CMS. But right now I´m struggling with getting the content out of a block. My contenttypes.yml:

blocks:
    name: Blocks
    singular_name: Block
    fields:
        title:
            type: text
            class: large
            group: "Block"
        slug:
            type: slug
            uses: [ title ]
        text-one:
            type: text
            label: Tekst 1
            group: content
        text-two:
            type: text
            label: Tekst 2
            group: content
        text-three:
            type: text
            label: Tekst 3
            group: content
        text-four:
            type: text
            label: Tekst 4
            group: content
        text-five:
            type: text
            label: Tekst 5
            group: content
        text-six:
            type: text
            label: Tekst 6
            group: content

My Twig code:

{% setcontent block_cta = "block/cta-nl" %}

Am I missing something?

Thanks in advance.

  • I just posted answer on your question hope it helps. but eeh btw ` uses: [ title ]` sould just be ` uses: title ` – B. Dionys Mar 08 '17 at 10:25

1 Answers1

0

Hello your doing it a little bit wrong. if you want to get the value's out of an content type you should try this

{% setcontent name = "blocks" %}

you should call uppon the content type.

if you want to test what this gives back: {{ dump(test) }}

Hope this helps.

B. Dionys
  • 916
  • 7
  • 34