templatestwigbolt-cms

Mix twig templating and text in bolt cms


I came to a point where I wanted to display some of my custom contenttype in a html field in bolt. I have a page where I'm editing the content and within the content I'd like to display some of my contenttype's attributes.
Can I somehow display data using the template engine like { mycontenttype.title }, can I include some partials in a html field or do I have to write my own template and have to deal with the fact I can't put my own contenttype inbetween the normal text?
My attempt so far was to try using the templateing style, which didn't work out and I didn't find a trace yet on how to configure it (if possible).


Solution

  • I think you need to allow twig tags on your field in your contenttypes.yml file by adding: allowtwig: true to your html field definition.