- evo_megamenu_json: new entry layout "pagetree" - the panel columns mirror the live subtree of the page the entry links to (one child per column, grandchildren as items, getMenu() restrictions apply), so the menu can never age against the page structure again. The stale 9-market panel after the markets realign was the trigger. Curated columns are ignored on this layout; teasers and the featured slot stay editorial. Same columns shape in the payload - front ends need no change beyond knowing the new layout string - new vitec:normalize-slugs --root=<slug> [--style=plain|and]: recursively realigns every slug below a root to <parent-slug>/<slugified-title>, cascading, with a sibling-collision warning; EXT:redirects covers the old URLs. TYPO3's slug generator keeps slashes from page titles (third hit: rtcc-/-rtic), this sweeps a whole tree. Run on /solutions: four fixes, including the long-standing passenger page and solution page 467. The misspelled "engagament" slug stays deliberately - it follows the page title and is fixed in the coordinated typo task Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
191 lines
7.6 KiB
PHP
191 lines
7.6 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* One item in the main navigation bar - the thing a visitor hovers.
|
|
*
|
|
* `link` is a real target: the bar item stays clickable and leads to the
|
|
* overview page, the panel only opens on hover. `layout` decides which of
|
|
* the two panel shapes renders - a column grid, or a small link column
|
|
* next to teaser cards.
|
|
*/
|
|
|
|
$ll = 'LLL:EXT:evo_megamenu_json/Resources/Private/Language/locallang_db.xlf:tx_evomegamenujson_entry.';
|
|
|
|
return [
|
|
'ctrl' => [
|
|
'title' => 'LLL:EXT:evo_megamenu_json/Resources/Private/Language/locallang_db.xlf:tx_evomegamenujson_entry',
|
|
'label' => 'title',
|
|
'label_alt' => 'layout',
|
|
'label_alt_force' => true,
|
|
'tstamp' => 'tstamp',
|
|
'crdate' => 'crdate',
|
|
'delete' => 'deleted',
|
|
'sortby' => 'sorting',
|
|
'hideTable' => true,
|
|
'versioningWS' => true,
|
|
'languageField' => 'sys_language_uid',
|
|
'transOrigPointerField' => 'l10n_parent',
|
|
'transOrigDiffSourceField' => 'l10n_diffsource',
|
|
'enablecolumns' => [
|
|
'disabled' => 'hidden',
|
|
],
|
|
'iconfile' => 'EXT:evo_megamenu_json/Resources/Public/Icons/entry.svg',
|
|
'searchFields' => 'title',
|
|
],
|
|
'types' => [
|
|
'1' => [
|
|
'showitem' => '
|
|
--div--;' . $ll . 'tab.general,
|
|
hidden, title, link, layout,
|
|
--div--;' . $ll . 'tab.columns,
|
|
menu_columns,
|
|
--div--;' . $ll . 'tab.teasers,
|
|
menu_teasers,
|
|
--div--;' . $ll . 'tab.featured,
|
|
featured_enable, featured_kicker, featured_title, featured_text, featured_link, featured_image,
|
|
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:language,
|
|
sys_language_uid, l10n_parent
|
|
',
|
|
],
|
|
],
|
|
'columns' => [
|
|
'sys_language_uid' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
|
'config' => ['type' => 'language'],
|
|
],
|
|
'l10n_parent' => [
|
|
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'default' => 0,
|
|
'items' => [['label' => '', 'value' => 0]],
|
|
'foreign_table' => 'tx_evomegamenujson_entry',
|
|
'foreign_table_where' => 'AND {#tx_evomegamenujson_entry}.{#pid}=###CURRENT_PID### AND {#tx_evomegamenujson_entry}.{#sys_language_uid} IN (-1,0)',
|
|
],
|
|
],
|
|
'l10n_diffsource' => ['config' => ['type' => 'passthrough']],
|
|
'hidden' => [
|
|
'exclude' => true,
|
|
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
|
|
'config' => ['type' => 'check', 'renderType' => 'checkboxToggle', 'default' => 0],
|
|
],
|
|
'parentid' => ['config' => ['type' => 'passthrough']],
|
|
'parenttable' => ['config' => ['type' => 'passthrough']],
|
|
|
|
'title' => [
|
|
'label' => $ll . 'title',
|
|
'description' => $ll . 'title.description',
|
|
'config' => ['type' => 'input', 'size' => 40, 'eval' => 'trim', 'required' => true],
|
|
],
|
|
'link' => [
|
|
'label' => $ll . 'link',
|
|
'description' => $ll . 'link.description',
|
|
'config' => [
|
|
'type' => 'link',
|
|
'allowedTypes' => ['page', 'url', 'record'],
|
|
'size' => 40,
|
|
],
|
|
],
|
|
'layout' => [
|
|
'label' => $ll . 'layout',
|
|
'description' => $ll . 'layout.description',
|
|
// the teaser cards field depends on the layout (displayCond) -
|
|
// reload so it appears right away, without saving first
|
|
'onChange' => 'reload',
|
|
'config' => [
|
|
'type' => 'select',
|
|
'renderType' => 'selectSingle',
|
|
'default' => 'columns',
|
|
'items' => [
|
|
['label' => $ll . 'layout.columns', 'value' => 'columns'],
|
|
['label' => $ll . 'layout.teasers', 'value' => 'teasers'],
|
|
['label' => $ll . 'layout.catalog', 'value' => 'catalog'],
|
|
['label' => $ll . 'layout.pagetree', 'value' => 'pagetree'],
|
|
],
|
|
],
|
|
],
|
|
|
|
'menu_columns' => [
|
|
'label' => $ll . 'menu_columns',
|
|
'description' => $ll . 'menu_columns.description',
|
|
'config' => [
|
|
'type' => 'inline',
|
|
'foreign_table' => 'tx_evomegamenujson_column',
|
|
'foreign_field' => 'parentid',
|
|
'foreign_sortby' => 'sorting',
|
|
'maxitems' => 12,
|
|
'appearance' => [
|
|
'collapseAll' => true,
|
|
'expandSingle' => true,
|
|
'useSortable' => true,
|
|
'showSynchronizationLink' => false,
|
|
'showAllLocalizationLink' => false,
|
|
'showPossibleLocalizationRecords' => false,
|
|
'newRecordLinkAddTitle' => true,
|
|
'levelLinksPosition' => 'top',
|
|
],
|
|
],
|
|
],
|
|
'menu_teasers' => [
|
|
// catalog: the cards are the featured tiles of the left column
|
|
'displayCond' => 'FIELD:layout:IN:teasers,catalog',
|
|
'label' => $ll . 'menu_teasers',
|
|
'description' => $ll . 'menu_teasers.description',
|
|
'config' => [
|
|
'type' => 'inline',
|
|
'foreign_table' => 'tx_evomegamenujson_teaser',
|
|
'foreign_field' => 'parentid',
|
|
'foreign_sortby' => 'sorting',
|
|
'maxitems' => 8,
|
|
'appearance' => [
|
|
'collapseAll' => true,
|
|
'expandSingle' => true,
|
|
'useSortable' => true,
|
|
'newRecordLinkAddTitle' => true,
|
|
'levelLinksPosition' => 'top',
|
|
],
|
|
],
|
|
],
|
|
|
|
'featured_enable' => [
|
|
'label' => $ll . 'featured_enable',
|
|
'description' => $ll . 'featured_enable.description',
|
|
'config' => ['type' => 'check', 'renderType' => 'checkboxToggle', 'default' => 0],
|
|
],
|
|
'featured_kicker' => [
|
|
'displayCond' => 'FIELD:featured_enable:=:1',
|
|
'label' => $ll . 'featured_kicker',
|
|
'config' => ['type' => 'input', 'size' => 30, 'eval' => 'trim', 'max' => 60],
|
|
],
|
|
'featured_title' => [
|
|
'displayCond' => 'FIELD:featured_enable:=:1',
|
|
'label' => $ll . 'featured_title',
|
|
'config' => ['type' => 'input', 'size' => 40, 'eval' => 'trim'],
|
|
],
|
|
'featured_text' => [
|
|
'displayCond' => 'FIELD:featured_enable:=:1',
|
|
'label' => $ll . 'featured_text',
|
|
'config' => ['type' => 'text', 'cols' => 40, 'rows' => 3],
|
|
],
|
|
'featured_link' => [
|
|
'displayCond' => 'FIELD:featured_enable:=:1',
|
|
'label' => $ll . 'featured_link',
|
|
'config' => ['type' => 'link', 'allowedTypes' => ['page', 'url', 'record', 'file'], 'size' => 40],
|
|
],
|
|
'featured_image' => [
|
|
'displayCond' => 'FIELD:featured_enable:=:1',
|
|
'label' => $ll . 'featured_image',
|
|
'config' => [
|
|
'type' => 'file',
|
|
'maxitems' => 1,
|
|
'allowed' => 'common-image-types',
|
|
],
|
|
],
|
|
],
|
|
];
|