metamodels/attribute_tablemulti

MetaModels 动态表格多属性

2.2.3 2023-05-01 15:50 UTC

README

Build Status Latest Version tagged Latest Version on Packagist Installations via composer per month

表格多属性

MetaModels 的表格多属性。

原始想法来自 Byteworks

配置表格多属性

使用此属性,您可以使用 MultiColumnWizard 创建复杂表格结构。在例如 app/Resources/contao/config/dcaconfig.php 或其他配置加载的地方创建配置,并写入如下内容

mm_test 是表名,而 multi_test 是字段名。

$GLOBALS['TL_CONFIG']['metamodelsattribute_multi']['mm_test']['multi_test'] = array(
    'tl_class'     => 'clr',
    'minCount'     => 0,
    'columnFields' => array(
        'col_title' => array(
            'label'     => 'Title',
            'exclude'   => true,
            'inputType' => 'text',
            'eval'      => array
            (
                'style'=>'width:130px'
            )
        ),
        'col_highlight' => array(
            'label'     => 'Hervorheben',
            'exclude'   => true,
            'inputType' => 'checkbox',
            'eval'      => array
            (
                'style' => 'width:40px'
            )
        ),
        'col_url' => array(
            'label'     => 'URL',
            'exclude'   => true,
            'inputType' => 'text',
            'eval'      => array
            (
                'style'    =>'width:130px', 
                'mandatory'=>false, 
                'rgxp'     =>'url'
            )
        ),
    ),
);