【问题标题】:TYPO3 Inline element appearance configuration partially does not workTYPO3 内联元素外观配置部分不起作用
【发布时间】:2018-07-17 06:53:26
【问题描述】:

我的 TCA/Overrides 上有自己的内容元素,并且配置了一些外观设置。问题是我在后端部分获得了这些设置。这是我的代码:

$projectOptions = array( 
'ak_website' => [
    'exclude' => 1,
    'label' => 'LLL:EXT:ak_website_base/Resources/Private/Language/locallang.xlf:website.items',
    'config' => [
      'type' => 'inline',
      'foreign_table' => 'ak_website',
      'foreign_field' => 'tt_content',
      'maxitems' => 999,
      'appearance' => [
        'useSortable' => 1,
        'collapseAll' => 1,
        'levelLinksPosition' => 'bottom',
        'enabledControls' => [
            'info' => TRUE,
            'new' => TRUE,
            'dragdrop' => TRUE,
            'sort' => TRUE,
            'hide' => TRUE,
            'delete' => TRUE,
            'localize' => TRUE,
        ],
      ],
    ],
  ],
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content',$projectOptions);

现在,一切正常,但在外观设置上,以下设置不起作用。

  • 使用可排序
  • 拖放
  • 排序
  • 隐藏
  • 删除
  • 本地化

信息有效!

在我看来,与操纵有关的一切都行不通。我可能忘记设置一些权限,或者包含 TYPO3 功能等。我现在真的不知道该做什么。这对于将来的参考以及可能遇到相同问题的人在这里找到解决方案非常有用。

最好的问候,

【问题讨论】:

    标签: typo3 typo3-8.x typo3-tca


    【解决方案1】:

    感谢 TYPO3 社区,特别是 Carine LAVAL,我找到了答案。

    我的数据库需要一个排序列。

    这是如何工作的:

    ak_website.php (TCA)

    添加'sortby' => '排序',

    <?php
     return [
      'ctrl' => [
       'sortby' => 'sorting',
    ],
    

    ext_tables.sql

    在你的桌子上添加这个:

    sorting int(11) DEFAULT '0' NOT NULL,
    

    你们都准备好了:)

    【讨论】:

      猜你喜欢
      • 2018-02-16
      • 2019-04-27
      • 2018-09-27
      • 1970-01-01
      • 2018-09-17
      • 1970-01-01
      • 1970-01-01
      • 2020-01-07
      • 1970-01-01
      相关资源
      最近更新 更多