ichhabrecht / content-defender
在您的后端布局中定义允许或拒绝的内容元素类型
3.4.3
2024-04-29 07:35 UTC
Requires
- php: ^7.4 || ^8.0
- typo3/cms-backend: ^10.4 || ^11.5 || ^12.4
- typo3/cms-core: ^10.4 || ^11.5 || ^12.4
Requires (Dev)
- doctrine/dbal: ^2.11 || ^3.8
- php-parallel-lint/php-parallel-lint: ^1.4
- phpspec/prophecy: ^1.12.1
- phpspec/prophecy-phpunit: ^2.0
- phpunit/phpunit: ^8.4 || ^9.0
- typo3/cms-fluid-styled-content: ^10.4 || ^11.5 || ^12.4
- typo3/cms-indexed-search: ^10.4 || ^11.5 || ^12.4
- typo3/cms-workspaces: ^10.4 || ^11.5 || ^12.4
- typo3/minimal: ^10.4 || ^11.5 || ^12.0
- typo3/testing-framework: ^6.16 || ^7.0.2
Conflicts
- psr/container: <1.1
- typo3/testing-framework: >=7.0.0 <7.0.4
Replaces
- typo3-ter/content-defender: 3.4.3
- dev-main
- 3.x-dev
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.0
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.12
- 3.0.11
- 3.0.10
- 3.0.9
- 3.0.8
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.x-dev
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-premerge/compatiblity-13
- dev-pre-merge
- dev-feature/show-maxitems-in-pagemodule
- dev-feature/improve-container-integration
- dev-change-hook-api
- dev-support-columns-without-colpos
This package is auto-updated.
Last update: 2024-09-07 07:51:28 UTC
README
内容防御器为定义后端布局中允许或拒绝的内容元素类型提供了更多选项
安装
此扩展可以使用Composer或扩展管理器安装。
Composer
composer require ichhabrecht/content-defender
扩展管理器
使用方法
- 您只需调整您的backend_layout的列配置
限制某些内容元素字段
- 要为内容元素字段允许一组有限的值,请使用
allowed.field = [逗号分隔的值列表]
示例
columns {
1 {
name = Column with header and textmedia elements
colPos = 3
colspan = 6
allowed {
CType = header, textmedia
}
}
}
columns {
1 {
name = Column with News plugin only
colPos = 3
colspan = 6
allowed {
CType = list
list_type = news_pi1
}
}
}
组合多个内容元素字段
- 此示例允许多个内容元素类型(文本和列表),同时将插件类型限制为仅
news
。
示例
columns {
1 {
name = A column with restricted list_type and "normal" CType
colPos = 3
colspan = 6
allowed {
CType = textmedia, list
list_type = news_pi1
}
}
}
拒绝某些内容元素类型
- 要从内容元素字段中删除一组值,请使用
disallowed.field = [逗号分隔的值列表]
示例
columns {
1 {
name = Column without divider, plain html and table elements
colPos = 3
colspan = 6
disallowed {
CType = div, html, table
}
}
}
columns {
1 {
name = Column with header and list, without News plugin
colPos = 3
colspan = 6
allowed {
CType = header, list
}
disallowed {
list_type = news_pi1
}
}
}
限制内容元素的数量
- 要限制内容元素的数量,请使用
maxitems = [元素数量]
示例
columns {
1 {
name = Column with one textmedia
colPos = 3
colspan = 6
allowed {
CType = textmedia
}
maxitems = 1
}
}
已知问题
TypeError
count(): 第1个参数($value)必须是Countable或array类型,但得到的是null
内容防御器需要可用的运行时缓存。请确保此缓存不使用 \TYPO3\CMS\Core\Cache\Backend\NullBackend后端。
社区
- 感谢b13赞助此扩展的维护
- 感谢Wolfgang Wagner赞助此扩展的维护
- 感谢WACON Internet GmbH赞助此扩展的维护,通过GitHub赞助
- 感谢Daniel Goerz在他的博客useTYPO3中撰写有关content_defender的内容
- 感谢Marcus Schwemer在他的博客TYPO3worx中撰写有关content_defender的内容