guave/flexibleelement-bundle

安装: 565

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 1

公开问题: 0

类型:contao-bundle

1.8.1 2024-05-23 10:05 UTC

This package is auto-updated.

Last update: 2024-09-23 10:49:46 UTC


README

此contao模块添加了一个内容元素,允许您使用特定的布局。

要求

Contao >4 (已测试4.8)
此库依赖于visualradio (https://github.com/guavestudios/contao-visualradio)

安装

composer require guave/flexibleelement-bundle

用法

  • 要更改显示的字段或添加新的字段,请将“templates”数组添加到您的 src/Resources/contao/config/config.php
<?php
$GLOBALS['TL_FLEXIBLEELEMENT']['templates'] = [
    [
        'id'       => 'flexible-2column-text',
        'template' => 'content-elements/ce_2column-text',
    ],
];
  • 如果您添加了新的字段,请在新子调色板中添加一个新的子调色板到您的 src/Resource/contao/dca/tl_content.php
<?php
$GLOBALS['TL_DCA']['tl_content']['subpalettes']['elementTemplate_flexible-2column-text'] = 'flexibleTitle,flexibleText,flexibleTextColumn';

使用 $GLOBALS['TL_FLEXIBLEELEMENT']['templates'] 的ID在子调色板的 "elementTemplate_" 键中使用