0

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?

Bernd Wilke πφ
  • 10,390
  • 1
  • 19
  • 38
Christiane
  • 25
  • 5
  • the assignments to the `*RootPaths.1` looks weird: where is `Resources/...` located? in your notation it is located in the web root (sibling of `fileadmin/`). That would be very unusual. – Bernd Wilke πφ Oct 15 '20 at 07:14

1 Answers1

1

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.

Peter Kraume
  • 3,577
  • 2
  • 21
  • 39
  • Thank you, it worked! Do all of my custom modifications of the news plugin belong to TSConfig or is it ok in the TypoScript setup? – Christiane Oct 15 '20 at 06:10
  • Modifications for the frontend are done via TypoScript, modifications for the backend via TSConfig. – Julian Hofmann Oct 15 '20 at 06:41
  • It strongly depends on what you want to do: changes for the backend, e.g. new options in the template selector or other changes to fields in the news records, etc. belong to TSConfig. All frontend related things go to TypoScript. Maybe you want to check the subfolders [TSconfig and TypoScript](https://github.com/georgringer/news/tree/master/Configuration) of the news extension. To learn more about the differences of TypoScript and TSconfig, check [this](https://stackoverflow.com/questions/5033306/in-typo3-what-is-the-difference-between-setup-constants-and-tsconfig). – Peter Kraume Oct 15 '20 at 06:48