cdowdy / boltbetterthumbs

Bolt Extension for thumbnails, srcset and picture element using Glide
6 stars 2 forks source link

Twig cannot be used in record edit/creation page #43

Closed cdowdy closed 7 years ago

cdowdy commented 7 years ago

with allow twig set to true in your contentType field the twig tag no longer renders the image but the escaped twig output.

contentType Setup:

pages:
    name: Pages
    singular_name: Page
    fields:
        title:
            type: text
            class: large
            group: content
        slug:
            type: slug
            uses: title
        image:
            type: image
        teaser:
            type: html
            height: 150px
        body:
            type: html
            height: 300px
            allowtwig: true # here alllow twig is set to true!
        template:
            type: templateselect
            filter: '*.twig'
    taxonomy: [ groups ]
    recordsperpage: 100

Using it in content:
betterthumbs-twig-in-content

Result:
betterthumbs-twig-escaped-result

cdowdy commented 7 years ago

new result same setup as above. same tag used in our body content editor betterhtumgs-allow-twig-result