Skip to content

Instantly share code, notes, and snippets.

@DavidBruchmann
Created February 14, 2026 08:56
Show Gist options
  • Select an option

  • Save DavidBruchmann/7b62f6f489d2cb79bbcc9455ae00b888 to your computer and use it in GitHub Desktop.

Select an option

Save DavidBruchmann/7b62f6f489d2cb79bbcc9455ae00b888 to your computer and use it in GitHub Desktop.
TYPO3 CE Definition List
<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
$extensionKey = 'sitepackage';
return [
'tx-sitepackage-ce-definitionList' => [
'provider' => SvgIconProvider::class,
'source' => 'EXT:sitepackage/Resources/Public/Icons/tx_sitepackage_ce_definitionList.svg',
],
];
<?php
defined('TYPO3') || die();
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
call_user_func(function() {
$extensionKey = 'sitepackage';
ExtensionManagementUtility::addPlugin(
[
'0' => 'Definition List', // Label
'1' => 'tx_mrsitepackage_definitionList', // Identifier
'2' => 'tx-sitepackage-ce-definitionList', // Icon (defined in Configuration/Icons.php)
'3' => $groupID,
],
'CType',
$extensionKey
);
});
tt_content.tx_mrsitepackage_definitionList =< tt_content.table
tt_content.tx_mrsitepackage_definitionList {
templateName = DefinitionList
dataProcessing.10 {
maximumColumns.field >
maximumColumns = 2
as = definitionList
}
}
<html xmlns:f="https://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:layout name="Default" />
<f:section name="Main">
<dl>
<f:for each="{definitionList}" as="row">
<f:if condition="{row.0}"><dt>{row.0}</dt></f:if>
<f:if condition="{row.1}"><dd>{row.1}</dd></f:if>
</f:for>
</dl>
</f:section>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment