Home > front end >  How do I add a palette to tx_news in TYPO3?
How do I add a palette to tx_news in TYPO3?

Time:01-31

How do I add the core gallerySettings palette to the media tab of 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:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
    'tx_news_domain_model_media',
    '---palette--;;gallerySettings',
    '',
    'after:fal_media'
);

CodePudding user response:

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.

That's the TCA as well as database table definitions and the necessary TypoScript. Please consult typo3/sysext/fluid_styled_content for details of the frontend output. TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor is what you need.

CodePudding user response:

tt_content and tx_news_domain_model_news are two different tables. you cannot add fields from the one to the other.

  •  Tags:  
  • Related