TYPO3 news - defining own templateLayouts

1.2k views Asked by At

I'm using TYPO3 v10.4. with the news extension. I would like to add my own templates which I can customize on different pages.

I followed the official news guide: https://docs.typo3.org/p/georgringer/news/master/en-us/AdministratorManual/Templates/TemplateSelector/Index.html

In my Setup.ts I defined:

plugin.tx_news {
  view {
    templateRootPaths >
    templateRootPaths {
      0 = EXT:news/Resources/Private/Templates/
      1 = Resources/Private/Ext/news/Templates/
    }

    partialRootPaths >
    partialRootPaths {
      0 = EXT:news/Resources/Private/Partials/
      1 = Resources/Private/Ext/news/Partials/
    }

    layoutRootPaths >
    layoutRootPaths {
      0 = EXT:news/Resources/Private/Layouts/
      1 = Resources/Private/Ext/news/Layouts/
    }

    #widget.GeorgRinger\News\ViewHelpers\Widget\PaginateViewHelper.templateRootPath = Resources/Private/Ext/news/Templates/
  }

  settings {
    list {
      cropMaxCharactersSmall = 100
      cropMaxCharactersHigh = 500
    }
  }

  templateLayouts {
    1 = Homepage
    2 = Default Layout
  }
}

Unfortunately, my defined layouts don't appear in the BE of the news plugin. The setup generally works because I am using my customized Templates and Partials, as well as the variables in the settings part.

Anyone an idea what could be missing?

1

There are 1 answers

3
Peter Kraume On BEST ANSWER

tx_news.templateLayouts belongs to your TSConfig, not to the TypoScript setup.

By the way, your TypoScript snippet looks somehow weird. I tried to reformat it, but maybe you want to double check that again.