georgringer/container-modify-fields
Composer 安装命令:
composer require georgringer/container-modify-fields
包简介
Manipulate content elements which are children inside a EXT:container container
README 文档
README
This extensions makes it possible to modify the TCA of container children elements.
Examples:
- The content element "text" shouldn't have a field "header_link" if inside a container
- The header of content element "header" must be required if in colPos "100" of a container.
Usage:
Install with composer req georgringer/container-modify-fields.
Configuration
The configuration must be done in PageTsConfig with the following syntax:
TCEFORM.tt_content.container {
<container-ctype>.<colpos>.<child-ctype>.<field> {
# currently supported is only:
required = 1
disabled = 1
fixedItemValue = 1
}
# Instead of <colpos> and <child-ctype> also "_all" is valid
}
Example 1
The behaviour of elements inside container "b13-2cols-with-header-container" is changed:
- All elements: No header_link field
- Element "text": No header field
TCEFORM.tt_content.container {
b13-2cols-with-header-container {
_all {
_all {
header_link.disabled = 1
}
text {
header.disabled = 1
}
}
}
}
Example 2
The behaviour of elements inside container "b13-2cols-with-header-container" is changed:
- The header element inside colPos "200" is set to required
TCEFORM.tt_content.container {
b13-2cols-with-header-container {
200 {
header {
header.required = 1
}
}
}
}
Example 3: fixedItemValue
This setting works only with select items: all other items are removed, so its value can't be changed any more.
The behaviour of all elements inside accordion container is changed:
- the
header_layoutis set toHidden [100]. In accordion, field "header" is used for accordion header and shouldn't be displayed in content block- the
space_before_classis set tosmall(=> example for string values)
TCEFORM.tt_content.container {
accordion.101._all {
header_layout {
fixedItemValue = 100
}
space_before_class {
fixedItemValue = small
}
}
}
georgringer/container-modify-fields 适用场景与选型建议
georgringer/container-modify-fields 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 589 次下载、GitHub Stars 达 6, 最近一次更新时间为 2022 年 02 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 georgringer/container-modify-fields 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 georgringer/container-modify-fields 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 589
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2022-02-15