kevinappelt / content-defender
Define allowed or denied content element types in your backend layouts
Installs: 319
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 39
Type:typo3-cms-extension
Requires
- php: ^7.4 || ^8.0
- typo3/cms-backend: ^10.4 || ^11.5 || ~12.0 || ~12.1 || ~12.2
- typo3/cms-core: ^10.4 || ^11.5 || ~12.0 || ~12.1 || ~12.2
Requires (Dev)
- phpspec/prophecy: ^1.12.1
- sbuerk/typo3-cmscomposerinstallers-testingframework-bridge: ^0.1.0
- typo3/cms-fluid-styled-content: ^10.4 || ^11.5 || ~12.0 || ~12.1 || ~12.2
- typo3/cms-indexed-search: ^10.4 || ^11.5 || ~12.0 || ~12.1 || ~12.2
- typo3/cms-workspaces: ^10.4 || ^11.5 || ~12.0 || ~12.1 || ~12.2
- typo3/minimal: ^10.4 || ^11.5 || ^12.0
- typo3/testing-framework: ^6.16 || 7.*@dev
Replaces
- typo3-ter/content-defender: dev-main
This package is not auto-updated.
Last update: 2024-12-25 00:24:23 UTC
README
Define allowed or denied content element types in your backend layouts
Installation
Simply install the extension with Composer or the Extension Manager.
Usage
- You only need to adjust the column configuration of your backend_layout
Restrict certain content element fields
- To allow a limited set of values for content element fields use
allowed.field = [list of comma separated values]
Examples:
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
}
}
}
Combine multiple content element fields
- The example allows multiple content element types (text and list) while restricting plugin types to
news
only.
Example:
columns {
1 {
name = A column with restricted list_type and "normal" CType
colPos = 3
colspan = 6
allowed {
CType = textmedia, list
list_type = news_pi1
}
}
}
Deny certain content element types
- To remove a set of values from content element fields use
disallowed.field = [list of comma separated values]
Examples:
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
}
}
}
Limit the number of content elements
- To restrict the number of content elements use
maxitems = [number of elements]
Example:
columns {
1 {
name = Column with one textmedia
colPos = 3
colspan = 6
allowed {
CType = textmedia
}
maxitems = 1
}
}
Community
- Thanks to b13 that sponsored the maintenance of this extension with a sponsorship
- Thanks to Wolfgang Wagner who sponsored the maintenance of this extension with a sponsorship
- Thanks to WACON Internet GmbH that sponsored the maintenance of this extension with a GitHub sponsorship
- Thanks to Daniel Goerz who wrote about content_defender in his blog useTYPO3
- Thanks to Marcus Schwemer who wrote about content_defender in his blog TYPO3worx