简体   繁体   English

在螺栓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. 我到了要在螺栓的html字段中显示一些自定义contenttype的地步。 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. 我有一个页面,我正在其中编辑内容,并且在该页面中我想显示某些contenttype的属性。
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? 我可以使用模板引擎一样莫名其妙地显示数据{ mycontenttype.title } ,我可以包括一些partials在HTML场还是我写我自己的模板,并不得不面对这样的事实,我不能把我自己的插图中的contentType正常的文字?
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). 到目前为止,我的尝试是尝试使用模板样式,该样式没有奏效,我也没有找到有关如何配置它的痕迹(如果可能)。

我认为您需要通过在HTML字段定义中添加: allowtwig: true来在contenttypes.yml文件中的字段上允许使用树枝标记

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM