mvo/contao-group-widget 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mvo/contao-group-widget

最新稳定版本:v1.6.1

Composer 安装命令:

composer require mvo/contao-group-widget

包简介

Adds a new group widget that allows repeating a set of DCA fields.

README 文档

README

Latest version on packagist

This Contao CMS extension provides an input type group that allows repeatable groups of fields in the backend. The resulting data is either stored as a serialized array or in a custom entity relationship (ORM).

Design decisions / Limitations

The group element widgets are still 'first class citizens' of the respective DCA. Only their definition will be made on the fly. This way we're not messing with the act of rendering and state of the displayed child widgets. As a result, adding new elements via the plus button will submit the current DCA form to add the new element.

Visual reordering of elements is done via the CSS order property. This way iframes can be kept alive (the DOM won't change) which is especially helpful when dealing with components like the tinyMCE rich text editor.

Documentation

TLDR;

Just give me an example, ok?

$GLOBALS['TL_DCA']['tl_content']['fields']['my_group'] = [
    'inputType' => 'group',
    'palette' => ['amount', 'singleSRC', 'text'],   
    'fields' => [
        'amount' => [ // additional field, defined inline
            'inputType' => 'text',
            'eval' => ['tl_class' => 'w50'],
        ],
        '&singleSRC' => [ // let's change some properties of the existing field
            'eval' => ['mandatory' => false],
        ]   
    ],   
    
    // force at least 1, at max 5 elements
    'min' => 1,
    'max' => 5,
    
    // disable ordering (on by default)
    'order' => false,
    
    // store serialized into a blob (default storage backend)
    'sql' => [
        'type' => 'blob',
        'length' => \Doctrine\DBAL\Platforms\MySQLPlatform::LENGTH_LIMIT_BLOB,
        'notnull' => false,
    ],
];

统计信息

  • 总下载量: 111.83k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 28
  • 点击次数: 0
  • 依赖项目数: 21
  • 推荐数: 1

GitHub 信息

  • Stars: 26
  • Watchers: 3
  • Forks: 10
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固