feat: content element for faq overview grouped by categories

addresses #869b064ah
This commit is contained in:
Björn Fromme
2026-06-23 18:42:01 +02:00
parent e0b43a7a38
commit 561883f74a
6 changed files with 139 additions and 7 deletions
@@ -0,0 +1,28 @@
<?php
defined('TYPO3_MODE') or die();
call_user_func(function() {
$frontendLanguageFilePrefix = 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem(
'tt_content',
'CType',
[
'FAQ Alle Kategorien',
'faq_overview',
'content-ep_theme-ce',
],
'nlform',
'after'
);
$GLOBALS['TCA']['tt_content']['types']['faq_overview'] = [
'showitem' => '
--palette--;' . $frontendLanguageFilePrefix . 'palette.general;general,
--div--;' . $frontendLanguageFilePrefix . 'tabs.access,
hidden;' . $frontendLanguageFilePrefix . 'field.default.hidden,
--div--;' . $frontendLanguageFilePrefix . 'tabs.extended
',
];
});
@@ -85,6 +85,12 @@ mod {
}
special {
elements {
faq_overview {
iconIdentifier = content-ep_theme-ce
title = FAQ Alle Kategorien
description = Alle FAQ-Einträge nach Kategorie gruppiert
tt_content_defValues.CType = faq_overview
}
lineup {
iconIdentifier = content-ep_theme-ce
title = Lineup
@@ -104,7 +110,7 @@ mod {
tt_content_defValues.CType = nlform
}
}
show := addToList(lineup, event_pricetable, nlform)
show := addToList(faq_overview, lineup, event_pricetable, nlform)
}
common {
elements {
@@ -0,0 +1,17 @@
tt_content.faq_overview =< lib.contentElement
tt_content.faq_overview {
templateName = FaqOverview
settings {
infoPageUid = {$plugin.tx_eptheme.settings.infoPageUid}
}
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
10 {
table = tx_epproducts_domain_model_faq
where = category != ''
orderBy = category ASC, uid ASC
pidInList = {$plugin.tx_epproducts.settings.faqsStoragePid}
as = faqs
}
}
}