boxes - 渲染一个盒子编辑器,用于构建可视化页面,并像一个前端页面构建器一样工作。
此字段是在 October CMS 应用商店上安装 Boxes 插件 后引入的。
获得许可后,您可以使用以下命令安装它。
php artisan plugin:install OFFLINE.Boxes:::
要在 Tailor 后端表单中显示 Boxes 编辑器,像这样定义一个表单字段:
fields:
boxes_content:
label: Boxes Content
span: adaptive # This makes sure the Boxes Editor looks good in Tailor.
type: boxes # This loads the Boxes Editor.在你的前端,你可以接着使用你的字段上的 render 方法来获取渲染后的 HTML 内容:
[section yourSectionVar]
handle = "Your\Handle"{{ yourSectionVar.boxes_content.render|raw }}