oliverthiele / ot-irrebuttons
Adds buttons to content elements with IRRE
Installs: 2
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- php: >=8.1
- typo3/cms-core: ^12.4||^13.4
Requires (Dev)
- roave/security-advisories: dev-latest
README
This extension adds database fields to the tt_content table in TYPO3, which enables the output of buttons without having to add them to the RTE.
Advantages:
- Central control of the button layout
- Icons in the button are easy to implement
- Configurable for different CTypes
Installation
composer req oliverthiele/ot-irrebuttons
Configuration
Customization of the extension settings
CTypes
The CTypes for which the buttons are to be displayed can be configured in the extension settings.
(Admin Tools -> Settings -> Extension Configuration -> ot_irrebuttons -> CTypes with IRRE Buttons)
For each CType, the corresponding FluidTemplate from EXT:fluid_styled_content must then also be overwritten in its own SitePackage. An example is provided for CType "text".
The following HTML code must then be added:
<f:if condition="{irreButtons}"> <f:render partial="IrreButtons" section="Main" arguments="{data : data, irreButtons : irreButtons}"/> </f:if>
Icons
The icon identifiers can be specified here as a comma-separated list.
As an example, a few Bootstrap Icons are preset here:
bi-chevron-left, bi-chevron-right, bi-download, bi-file, bi-file-pdf, bi-send
.
The icon identifiers are then output in the partial EXT:ot_irrebuttons/Resources/Private/Bootstrap5/Partials/Icon.html. This partial can be overwritten in your own SitePackage so that SVG sprites, for example, can also be implemented.
TypoScript
The constant projectSettings.framework.directory
must be set in the TypoScript.
This can also be done in your own SitePackage. In the supplied constants.typoscript file the preset is Bootstrap5.
I use this constant to centrally adjust the path to the template files in my other extensions.
If I change to a different framework at a later date, I can then change all template files in one place.
TYPO3 Site Sets are supported in version v3.1.0. The constant
projectSettings.framework.directory is no longer used; instead, sitekit.frameworks.frontend.directory is used.
I use this constant in my various Sitekit extensions. To ensure that the old installations continue to
work, I have not yet removed the constant projectSettings.framework.directory
.
Customization of the partial for icons
The Icon.html partial is used by default. The path must be overwritten in your own SitePackage! Depending on the icon set used (e.g. Bootstrap Icons, FontAwesome, own ViewHelper, ...) this file must be adapted differently. For this purpose, an additional path to the FluidTemplate files can be specified in the TypoScript:
Example:
lib.contentElement {
templateRootPaths {
40 = EXT:my_sitepackage/Resources/Private/Content/Templates/
}
partialRootPaths {
40 = EXT:my_sitepackage/Resources/Private/Content/Partials/
}
layoutRootPaths {
40 = EXT:my_sitepackage/Resources/Private/Content/Layouts/
}
}