我想在新新闻模块的后端添加一个字段。为此,我创建了一个包含3个文件的新扩展名:
ext_emconf.php
<?php
$EM_CONF[$_EXTKEY] = array(
'title' => 'Expand news',
'description' => 'Expand news',
'category' => 'fe',
'author' => 'SOG',
'author_email' => '-',
'shy' => '',
'dependencies' => '',
'conflicts' => '',
'priority' => '',
'module' => '',
'state' => 'stable',
'internal' => '',
'uploadfolder' => 0,
'createDirs' => '',
'modify_tables' => '',
'clearCacheOnLoad' => 0,
'lockType' => '',
'author_company' => '',
'version' => '0.1.0',
'constraints' => array(
'depends' => array(
),
'conflicts' => array(
),
'suggests' => array(
),
),
'_md5_values_when_last_written' => '',
'suggests' => array(
),
);
?>ext_tables.php
<?php
/*if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}*/
$tempColumns = array(
'tx_sogexpandnews_test' => array(
'exclude' => 0,
'label' => 'test',
'config' => array(
'type' => 'text',
'cols' => '30',
'rows' => '5',
)
),
);
t3lib_div::loadTCA('tx_news_domain_model_news');
t3lib_extMgm::addTCAcolumns('tx_news_domain_model_news',$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes('tx_news_domain_model_news','tx_sogexpandnews_test', '', 'after:title'));
?>ext_tables.sql
#
# Table structure for table 'news'
#
CREATE TABLE tx_news_domain_model_news (
tx_sogexpandnews_test text
);该字段在数据库中,但当我想创建一个新的新闻项目时,我看不到后端中的字段。
我还检查了LocalConfiguation.php并确保我的分机在新闻分机下面。
知道我错过了什么吗?
发布于 2014-11-14 14:16:58
我不知道为什么,但我停止了新闻,更新并重新安装它,现在我看到了领域。
发布于 2014-11-18 13:57:53
缓存-缓存-缓存.总是缓存。
如果需要确定,请始终删除typo3temp中的所有内容,并刷新数据库中的所有cf_*表。
(卸载和重新安装几乎是一样的)
https://stackoverflow.com/questions/26931340
复制相似问题