TYPO3 Inline element appearance configuration part

2019-06-09 03:18发布

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条回答
成全新的幸福
2楼-- · 2019-06-09 03:29

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 :)

查看更多
登录 后发表回答