TYPO3列表模块:自定义记录未显示

时间:2016-11-07 07:31:08

标签: typo3

我正在使用TYPO3 7.6.11。 我写了一个提供程序扩展来添加一些ts代码,模板和viewhelper。 之后,我想添加一个自定义数据记录(在后端使用)。

我在ext_tables.sql中添加了表。 我在/ [extension] /Configuration/TCA/tablename.php

下有一个TCA配置

我添加了

TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tablename');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tablename');

到我的ext_tables.php

我错过了什么吗?

我在列表模块的“系统记录”下获得了一个新的记录类型。我可以添加这样的记录,并且TCA-config似乎可以用于记录表格。

但保存后,我在列表视图中没有记录。数据库看起来很好。记录在我的新表中正确保存。我究竟做错了什么? 感谢

编辑: CRTL:

'ctrl' => array (
    'title' =>       'LLL:EXT:svkcore/Resources/Private/Language/locallang.xlf:records.title',
    'label' => 'title',
    'label_alt' => '',
    'label_alt_force' => TRUE,
    'default_sortby' => 'ORDER BY datetime DESC',
    'prependAtCopy' => 'LLL:EXT:lang/locallang_general.php:LGL.prependAtCopy',
    'versioningWS' => TRUE,
    'versioning_followPages' => TRUE,
    'origUid' => 't3_origuid',
    'shadowColumnsForNewPlaceholders' => 'sys_language_uid,l18n_parent,starttime,endtime,fe_group',

    'dividers2tabs' => TRUE,
    'useColumnsForDefaultValues' => 'type',
    'transOrigPointerField' => 'l18n_parent',
    'transOrigDiffSourceField' => 'l18n_diffsource',
    'languageField' => 'sys_language_uid',
    'crdate' => 'crdate',
    'tstamp' => 'tstamp',
    'delete' => 'deleted',
    'type' => 'type',
    'cruser_id' => 'cruser_id',
    'editlock' => 'editlock',
    'enablecolumns' => array (
        'disabled' => 'hidden',
        'starttime' => 'starttime',
        'endtime' => 'endtime',
        'fe_group' => 'fe_group',
    ),
    'typeicon_column' => 'type',
    'typeicons' => array (
        '1' => 'EXT:svkcore/res/gfx/svkcore_inturl.gif',
        '2' => 'EXT:svkcore/res/gfx/svkcore_exturl.gif',
    ),
    'thumbnail' => 'image',
    'iconfile' => 'EXT:svkcore/res/gfx/ext_icon.gif',
    'searchFields' => 'uid,title,short,bodytext'),
'interface' => Array (
    'showRecordFieldList' => 'title,hidden,datetime_start,starttime,archivedate,category,short,image,record_files'
),

2 个答案:

答案 0 :(得分:1)

由于Typo3 7可以屏蔽列表视图。这是通过PageTSConfig配置的,看看你的info-Module(在页面树中选择正确的页面)并检查那里的TSConfig。

可以在以下路径中找到配置:

mod.web_list.allowedNewTables

答案 1 :(得分:0)

如果您拥有新表所需的一切,请检入ext_tables.php:Typoscript包含,语言文件,例如:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'My TS configuration');

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_myext_domain_model_mytable', 'EXT:my_ext/Resources/Private/Language/locallang_csh_tx_myext_domain_model_mytable.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_myext_domain_model_mytable');

您确定新记录存储在当前页面中:查看TS“ persistence.storagePid ”。 您可以签入数据库,其中pid用于您的新记录。

此致 弗洛里安