Show success stories below the product lists, linked on the category
sys_category gains a story selection and a layout (Options tab, alongside the images field EXT:news puts there), so one editorial decision serves every product list that renders the category. ProductListJsonRenderer emits them beside the products in the 7.3 list envelope; each card carries forCategories - the product categories it came from - so the front end hides it with the same ?cat=/?subcat= filter it applies to the products. Stories are collected over the category and its descendants and deduplicated. Story links follow the existing rule (detail page's parent path plus slug, which SuccessStoryPathRewrite maps back), taking the page from the element's FlexForm or the new site setting vitec.storyDetailPid. Spec raised to 1.17 with clause 7.15.2.1; the header had been left at 1.12 although entries up to 1.15 already existed, so today's two entries were renumbered to 1.16 and 1.17.
This commit is contained in:
1 parent
c90649fc1e
commit
55f7f82a42
11 files changed
+632
-318
No files matched your search
@@ -32,6 +32,47 @@ $customSysCategoryColumns = [
|
||||
'eval' => 'trim',
|
||||
],
|
||||
],
|
||||
// Success stories shown below the product list of this category. Lives on
|
||||
// the category rather than on the plugin so one editorial decision serves
|
||||
// every list that renders the category (decision 2026-09-11).
|
||||
'tx_vitec_success_stories' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:sys_category.tx_vitec_success_stories',
|
||||
'description' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:sys_category.tx_vitec_success_stories.description',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_vitec_domain_model_usecase',
|
||||
// No ORDER BY in foreign_table_where: TYPO3 appends its own
|
||||
// conditions after this fragment, which turns an ORDER BY here
|
||||
// into a syntax error. Sorting belongs in `sortItems`.
|
||||
'foreign_table_where' => 'AND {#tx_vitec_domain_model_usecase}.{#sys_language_uid} IN (0,-1)',
|
||||
'sortItems' => ['label' => 'asc'],
|
||||
'size' => 8,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 20,
|
||||
'enableMultiSelectFilterTextfield' => true,
|
||||
],
|
||||
],
|
||||
// Same vocabulary as the story and market lists (grid|list|carousel|50-50),
|
||||
// so the front end renders these cards with the component it already has.
|
||||
'tx_vitec_success_stories_layout' => [
|
||||
'exclude' => true,
|
||||
'displayCond' => 'FIELD:tx_vitec_success_stories:REQ:true',
|
||||
'label' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:sys_category.tx_vitec_success_stories_layout',
|
||||
'description' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_db.xlf:sys_category.tx_vitec_success_stories_layout.description',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 'grid',
|
||||
'items' => [
|
||||
['label' => 'Grid', 'value' => 'grid'],
|
||||
['label' => 'List', 'value' => 'list'],
|
||||
['label' => 'Carousel', 'value' => 'carousel'],
|
||||
['label' => '50 / 50', 'value' => '50-50'],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
// Add the fields to the TCA
|
||||
@@ -43,4 +84,15 @@ $customSysCategoryColumns = [
|
||||
'class, filetype, type',
|
||||
'',
|
||||
'after:description'
|
||||
);
|
||||
|
||||
// Success stories go into the existing "Options" tab. That tab comes from
|
||||
// EXT:news (it holds `images`), so anchoring after that field puts our field
|
||||
// INSIDE it - adding our own --div--;...options would produce a second tab of
|
||||
// the same name. EXT:news loads before EXT:vitec, so the anchor exists.
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
|
||||
'sys_category',
|
||||
'tx_vitec_success_stories, tx_vitec_success_stories_layout',
|
||||
'',
|
||||
'after:images'
|
||||
);
|
||||
Reference in new issue
Block a user