Search code examples
typoscripttypo3-7.6.xtx-news

TYPO3 EXT tx_news und typoscript USER multi integrations


i input multi integrations tx_news elements on my site, via TS: https://docs.typo3.org/typo3cms/extensions/news/AdministratorManual/BestPractice/IntegrationWithTypoScript/Index.html

it works fine! but the ext loaded the full tx_news libs again and again on the Frontpage! That even where the news page will not be used / loaded in FE even where the dough is not needed, the ext is loaded... :/ Thus, the website has become very slow.

how do I include multiple elements?

in the AdminPanel see i the loaded FE code "TYPO3\CMS\Extbase\Core\Bootstrap" is 280 in teh code and "Bootstrap" is over600 in the code

I comment out the info, then the website loads normally. what can i do? Thanks!


Solution

  • Just a rewording of your comment. Using a code like this

    page.10 = FLUIDTEMPLATE
    page.10 {
     variables {
        fo = USER
        fo {
          ...
        }
      }
    }
    

    will execute the USER (or any other cObj), no matter if is then used in the template at all. Therefore always a TS like this

    lib.fo = USER
    lib.fo {
      ...
    }
    

    and integrate it into the template by using <f:cObject typoscriptObjectPath="lib.fo" />

    Please mark the answer as solution, thanks