feat: content element for faq overview grouped by categories
addresses #869b064ah
This commit is contained in:
+28
@@ -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
|
||||
',
|
||||
];
|
||||
});
|
||||
+7
-1
@@ -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 {
|
||||
|
||||
+17
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user