【发布时间】:2016-09-28 15:13:56
【问题描述】:
我有一个自己的模板,在这个模板中我覆盖了 tx_news 的模板:
plugin.tx_news.view {
templateRootPaths.1 = EXT:my_template/Resources/Private/News/Templates/
partialRootPaths.1 = EXT:my_template/Resources/Private/News/Partials/
layoutRootPaths.1 = EXT:my_template/Resources/Private/News/Layouts/
}
现在我想从 my_template 访问 locallang.xlf。我在 my_template 的 ext_table.php 中试过这个:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tt_content.pi_flexform.news_pi1.list', 'EXT:my_template/Resources/Private/Language/locallang.xlf');
在这个 locallang.xlf 中我有:
<trans-unit id="tx_mytemplate.news">
<source>NEWSTEST</source>
</trans-unit>
然后在 tx_news List.html 我有:
<f:translate key="tx_mytemplate.news" />
但我没有得到任何输出。
【问题讨论】:
标签: typo3 fluid typo3-7.6.x tx-news