- getMenu() treats hidden/time/fe_group as enable fields but NOT
nav_hide - the treeColumns doc comment claimed otherwise, and the
news detail page ("article") stayed in the new spotlight rail after
the editor hid it in menus. All three getMenu() calls (spotlight nav,
pagetree columns and their items) now pass 'AND nav_hide = 0';
verified live (6 rail items)
- all four tx_evomegamenujson_* tables get
security.ignorePageTypeRestriction: they are inline children of the
menu plugin and live on whatever page the plugin sits on - creating
a new entry on the standard page failed with "table is not allowed"
- new vitec:attach-page-media --root=<slug> (dry-run by default):
attaches the numbered placeholder pages/<pid>-08.png (slot 08 = page
media / menu tile, the number doubles as the image wish list) as page
media to every child page without one; existing media is never
touched. Run for /support (8 pages) so the planned Support menu entry
renders as two 4-tile rows via the pagetree layout's column images
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
100 lines
4.0 KiB
PHP
100 lines
4.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* A single link line inside a column. `teaser` and `image` only reach the
|
|
* JSON from content stage 2 on, `pending` marks a target page that does not
|
|
* exist yet so the front end can grey the line out instead of linking into
|
|
* a 404.
|
|
*/
|
|
|
|
$ll = 'LLL:EXT:evo_megamenu_json/Resources/Private/Language/locallang_db.xlf:tx_evomegamenujson_item.';
|
|
|
|
return [
|
|
'ctrl' => [
|
|
'title' => 'LLL:EXT:evo_megamenu_json/Resources/Private/Language/locallang_db.xlf:tx_evomegamenujson_item',
|
|
'label' => 'title',
|
|
'label_alt' => 'teaser',
|
|
'tstamp' => 'tstamp',
|
|
'crdate' => 'crdate',
|
|
'delete' => 'deleted',
|
|
'sortby' => 'sorting',
|
|
'hideTable' => true,
|
|
'security' => [
|
|
// inline children of the menu plugin - they live on whatever
|
|
// page the plugin sits on, not only on sysfolders
|
|
'ignorePageTypeRestriction' => true,
|
|
],
|
|
'versioningWS' => true,
|
|
'languageField' => 'sys_language_uid',
|
|
'transOrigPointerField' => 'l10n_parent',
|
|
'transOrigDiffSourceField' => 'l10n_diffsource',
|
|
'enablecolumns' => ['disabled' => 'hidden'],
|
|
'iconfile' => 'EXT:evo_megamenu_json/Resources/Public/Icons/item.svg',
|
|
'searchFields' => 'title,teaser',
|
|
],
|
|
'types' => [
|
|
'1' => ['showitem' => 'hidden, title, link, pending, teaser, badge, 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_item',
|
|
'foreign_table_where' => 'AND {#tx_evomegamenujson_item}.{#pid}=###CURRENT_PID### AND {#tx_evomegamenujson_item}.{#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']],
|
|
|
|
'title' => [
|
|
'label' => $ll . 'title',
|
|
'config' => ['type' => 'input', 'size' => 40, 'eval' => 'trim', 'required' => true],
|
|
],
|
|
'link' => [
|
|
'label' => $ll . 'link',
|
|
'config' => ['type' => 'link', 'allowedTypes' => ['page', 'url', 'record', 'file'], 'size' => 40],
|
|
],
|
|
'pending' => [
|
|
'label' => $ll . 'pending',
|
|
'description' => $ll . 'pending.description',
|
|
'config' => ['type' => 'check', 'renderType' => 'checkboxToggle', 'default' => 0],
|
|
],
|
|
'teaser' => [
|
|
'label' => $ll . 'teaser',
|
|
'description' => $ll . 'teaser.description',
|
|
'config' => ['type' => 'input', 'size' => 40, 'eval' => 'trim', 'max' => 255],
|
|
],
|
|
'badge' => [
|
|
'label' => $ll . 'badge',
|
|
'description' => $ll . 'badge.description',
|
|
'config' => ['type' => 'input', 'size' => 15, 'eval' => 'trim', 'max' => 60],
|
|
],
|
|
'image' => [
|
|
'label' => $ll . 'image',
|
|
'description' => $ll . 'image.description',
|
|
'config' => [
|
|
'type' => 'file',
|
|
'maxitems' => 1,
|
|
'allowed' => 'common-image-types',
|
|
],
|
|
],
|
|
],
|
|
];
|