[英]How do I add a palette to tx_news in TYPO3?
How do I add the core gallerySettings
palette to the media tab of tx_news?如何将核心
gallerySettings
调色板添加到 tx_news 的媒体选项卡? I want to be able to use these settings in the news detail template.我希望能够在新闻详细信息模板中使用这些设置。
In my site package I have tried adding this to my tt_content.php
:在我的网站 package 中,我尝试将其添加到我的
tt_content.php
:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
'tx_news_domain_model_media',
'---palette--;;gallerySettings',
'',
'after:fal_media'
);
tt_content and tx_news_domain_model_news are two different tables. tt_content 和 tx_news_domain_model_news 是两个不同的表。 you cannot add fields from the one to the other.
您不能将一个字段添加到另一个字段。
It's not possible to reuse a palette from a different table.无法重用来自不同表的调色板。 What you could do is to implement the relevant code from
tt_content
in your extension.您可以做的是在您的扩展中实现来自
tt_content
的相关代码。
That's the TCA as well as database table definitions and the necessary TypoScript.这就是 TCA 以及数据库表定义和必要的 TypoScript。 Please consult typo3/sysext/fluid_styled_content for details of the frontend output.
有关前端 output 的详细信息,请参阅typo3/sysext/fluid_styled_content。
TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor
is what you need. TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor
是您需要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.