oneup/contao-custom-collection-bundle

该软件包已被废弃并且不再维护。没有推荐替代软件包。

安装: 107

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 1

类型:contao-bundle

0.1.2 2017-08-28 13:39 UTC

This package is not auto-updated.

Last update: 2020-01-21 05:18:09 UTC


README

使用

  1. 通过添加自定义子调色板扩展 tl_custom_collection.php 表格。名称必须对应于 type_<collection_archive>,其中 collection_archive 是您集合存档的蛇形名称。例如,对于一个名为 "Example Collection" 的存档
    $GLOBALS['TL_DCA']['tl_custom_collection']['subpalettes']['type_example_collection'] = ';{image_legend},addImage;{text_legend},text;';
    您可以选择众多预定义字段,或者,将您自定义的字段添加到 fields 数组中,例如
    $GLOBALS['TL_DCA']['tl_custom_collection']['fields']['exampleTextField'] = [
      'label'                   => &$GLOBALS['TL_LANG']['tl_custom_collection']['exampleTextField'],
      'exclude'                 => true,
      'search'                  => true,
      'sorting'                 => true,
      'inputType'               => 'text',
      'eval'                    => array('mandatory'=>false, 'maxlength'=>255),
      'sql'                     => "varchar(255) NOT NULL default ''"
    ];
  2. 安装并更新数据库后,在 Contao 后端创建一个自定义集合存档并开始添加到您的集合中。