TYPO3 Inline element appearance configuration partially does not work

隐身守侯 提交于 2019-12-23 06:13:22

问题


I have an own content element on my TCA/Overrides and i have some appearance settings configured. The problem is that i get these settings partially on my backend. This is my code:

$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);

Now, everything works as it suppose to work BUT on the appearance settings the following settings do not work.

  • useSortable
  • new
  • dragdrop
  • sort
  • hide
  • delete
  • localize

Info works!

The way i see it, everything that has to do with the manipulation, do not work. I might have forgotten to set some rights, or include a TYPO3 function etc. I really have no idea what to do right now. It would be great for future references and for people who might come across the same problem to find the solution here.

Best regards,


回答1:


Thanks to the TYPO3 community and specifically Carine LAVAL i found my answer.

I needed a sorting column on my database.

How this works:

ak_website.php (TCA)

Add 'sortby' => 'sorting',

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

ext_tables.sql

Add this on your table:

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

And you are all set :)



来源:https://stackoverflow.com/questions/51374987/typo3-inline-element-appearance-configuration-partially-does-not-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!