Typo3 8.7:后端不显示模块名称
Typo3 8.7: Name of module is not displayed in backend
在我的 Typo3 8.7 扩展中,我为后端注册了一个模块。不幸的是,模块本身工作正常,名称未显示。 (模块菜单左侧列表中的名称)。
我已经阅读了 doku 并按照那里所说的做了所有事情。我已经多次重新激活扩展并删除了所有缓存(也安装了缓存)。
这是我在 ext_tables.php
中的代码:
if (TYPO3_MODE === 'BE') {
call_user_func(
function ($extKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'TYPO3.' . $extKey,
'Customer Administration',
'Customer Administration',
'',
array(
'BackendManagement' => 'list, membershipInformationBackend',
'FrontendManageCertificate' => 'showCertificateDetails'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/ext_icon_small.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_shop_backend.xlf',
)
);
},
$_EXTKEY
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'someExt');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_someExt_domain_model_backendcustomer', 'EXT:someExt/Resources/Private/Language/locallang_csh_tx_someExt_domain_model_backendcustomer.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_someExt_domain_model_backendcustomer');
}
提前致谢。
拜托我的朋友,我在你的代码中只发现了一个错误。您没有传递翻译文件的密钥。这是可能的问题,请检查以下解决方案:
ext_tables.php
if (TYPO3_MODE === 'BE') {
call_user_func(
function ($extKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'TYPO3.' . $extKey,
'Customer Administration',
'Customer Administration',
'',
array(
'BackendManagement' => 'list, membershipInformationBackend',
'FrontendManageCertificate' => 'showCertificateDetails'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/ext_icon_small.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_shop_backend.xlf:shopModule', // Here is the problem
)
);
},
$_EXTKEY
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'someExt');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_someExt_domain_model_backendcustomer', 'EXT:someExt/Resources/Private/Language/locallang_csh_tx_someExt_domain_model_backendcustomer.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_someExt_domain_model_backendcustomer');
}
locallang_shop_backend.xlf
<trans-unit id="shopModule">
<source>Shop Management</source>
</trans-unit>
建议:如果您使用扩展构建器创建了一个扩展,那么会自动生成一个名为locallang_db.xlf的文件使用此文件进行后端标记。
希望这是有道理的!
在我的 Typo3 8.7 扩展中,我为后端注册了一个模块。不幸的是,模块本身工作正常,名称未显示。 (模块菜单左侧列表中的名称)。
我已经阅读了 doku 并按照那里所说的做了所有事情。我已经多次重新激活扩展并删除了所有缓存(也安装了缓存)。
这是我在 ext_tables.php
中的代码:
if (TYPO3_MODE === 'BE') {
call_user_func(
function ($extKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'TYPO3.' . $extKey,
'Customer Administration',
'Customer Administration',
'',
array(
'BackendManagement' => 'list, membershipInformationBackend',
'FrontendManageCertificate' => 'showCertificateDetails'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/ext_icon_small.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_shop_backend.xlf',
)
);
},
$_EXTKEY
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'someExt');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_someExt_domain_model_backendcustomer', 'EXT:someExt/Resources/Private/Language/locallang_csh_tx_someExt_domain_model_backendcustomer.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_someExt_domain_model_backendcustomer');
}
提前致谢。
拜托我的朋友,我在你的代码中只发现了一个错误。您没有传递翻译文件的密钥。这是可能的问题,请检查以下解决方案:
ext_tables.php
if (TYPO3_MODE === 'BE') {
call_user_func(
function ($extKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'TYPO3.' . $extKey,
'Customer Administration',
'Customer Administration',
'',
array(
'BackendManagement' => 'list, membershipInformationBackend',
'FrontendManageCertificate' => 'showCertificateDetails'
),
array(
'access' => 'user,group',
'icon' => 'EXT:' . $extKey . '/ext_icon_small.svg',
'labels' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_shop_backend.xlf:shopModule', // Here is the problem
)
);
},
$_EXTKEY
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'someExt');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_someExt_domain_model_backendcustomer', 'EXT:someExt/Resources/Private/Language/locallang_csh_tx_someExt_domain_model_backendcustomer.xlf');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_someExt_domain_model_backendcustomer');
}
locallang_shop_backend.xlf
<trans-unit id="shopModule">
<source>Shop Management</source>
</trans-unit>
建议:如果您使用扩展构建器创建了一个扩展,那么会自动生成一个名为locallang_db.xlf的文件使用此文件进行后端标记。
希望这是有道理的!