- new project-neutral extension evo_megamenu_json (Evomedien): a Megamenu plugin holding entries, columns, items, teaser cards and a featured slot as nested records; presentation settings travel with the payload so the front end reads behaviour instead of hard-coding it; published as page.10.fields.megaMenu, driven by the site settings megamenu.contentUid and megamenu.storagePid - vitec:seed-megamenu fills one element from the live structure: 5 entries, 26 columns, 95 items, 4 story cards; items without a page yet are flagged pending so the front end falls back to the column link - vitec:debug-sets prints the resolved site set order - read-only diagnostics: check_megamenu_schema.php, check_typoscript_templates.php - docs: schema updates run via extension:setup (database:updateschema no longer exists in v14), and a JSON Accept header activates headless-mixed, which strips every set-added page field
86 lines
3.4 KiB
PHP
86 lines
3.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* A teaser card - the editorial half of the "teasers" layout, used where a
|
|
* menu should show what is new rather than a full product tree.
|
|
*/
|
|
|
|
$ll = 'LLL:EXT:evo_megamenu_json/Resources/Private/Language/locallang_db.xlf:tx_evomegamenujson_teaser.';
|
|
|
|
return [
|
|
'ctrl' => [
|
|
'title' => 'LLL:EXT:evo_megamenu_json/Resources/Private/Language/locallang_db.xlf:tx_evomegamenujson_teaser',
|
|
'label' => 'title',
|
|
'label_alt' => 'kicker',
|
|
'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/teaser.svg',
|
|
'searchFields' => 'title,teasertext',
|
|
],
|
|
'types' => [
|
|
'1' => ['showitem' => 'hidden, kicker, title, teasertext, link, 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_teaser',
|
|
'foreign_table_where' => 'AND {#tx_evomegamenujson_teaser}.{#pid}=###CURRENT_PID### AND {#tx_evomegamenujson_teaser}.{#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']],
|
|
|
|
'kicker' => [
|
|
'label' => $ll . 'kicker',
|
|
'description' => $ll . 'kicker.description',
|
|
'config' => ['type' => 'input', 'size' => 25, 'eval' => 'trim', 'max' => 60],
|
|
],
|
|
'title' => [
|
|
'label' => $ll . 'title',
|
|
'config' => ['type' => 'input', 'size' => 40, 'eval' => 'trim', 'required' => true],
|
|
],
|
|
'teasertext' => [
|
|
'label' => $ll . 'teasertext',
|
|
'config' => ['type' => 'text', 'cols' => 40, 'rows' => 3],
|
|
],
|
|
'link' => [
|
|
'label' => $ll . 'link',
|
|
'config' => ['type' => 'link', 'allowedTypes' => ['page', 'url', 'record', 'file'], 'size' => 40],
|
|
],
|
|
'image' => [
|
|
'label' => $ll . 'image',
|
|
'config' => [
|
|
'type' => 'file',
|
|
'maxitems' => 1,
|
|
'allowed' => 'common-image-types',
|
|
],
|
|
],
|
|
],
|
|
];
|