我正在创建一个带有typo3 7.6.12的后端模块的扩展名。作为第一步,我需要在后端模块中将记录显示为列表。我刚刚添加了控制器名称,但不知道如何为后端模块列表编写。因此,如何从数据库中某些字段(例如名称等)中列出后端模块。除了PowerMail以外,是否有任何简单的扩展名?
首先,您需要在ext_tables.php
文件中注册为模块。
if (TYPO3_MODE === 'BE') {
TYPO3CMSExtbaseUtilityExtensionUtility::registerModule(
'Vendor' . $_EXTKEY,
'web', // Main area
'mod1', // Name of the module
'', // Position of the module
array( // Allowed controller action combinations
'Controller' => 'action, update, edit'
),
array( // Additional configuration
'access' => 'user,group',
'icon' => 'EXT:blog_example/ext_icon.gif',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_mod.xml',
)
);
}
寄存器是模块。您需要创建用于列表记录的模板文件夹,并且要使用此模板文件夹,则需要在setup.txt
文件中添加下面的标记。
module.tx_blogexample {
settings < plugin.tx_blogexample.settings
persistence < plugin.tx_blogexample.persistence
view < plugin.tx_blogexample.view
view {
templateRootPath = EXT:blog_example/Resources/Private/Backend/Templates/
partialRootPath = EXT:blog_example/Resources/Private/Backend/Partials/
layoutRootPath = EXT:blog_example/Resources/Private/Backend/Layouts/
}
}