0

Since I upgraded to Typo3 6.+, I've had a lot of hard times to get my custom templates/partials to work under a custom extension extended from News 3.0.1.

Of course I ran through the documentation : http://docs.typo3.org/typo3cms/extensions/news/stable/singlehtml/#changing-paths-of-the-template

But I don't get it, I tried to use the typoscript from the documentation into my setup and constants, but I can't get it to work --> the default templates/partials from ext:news are the ones that show up all the time.

Here is my Configuration (setup) :

lib.cust_news= COA
   lib.cust_news{
     20 = TEXT
     20.wrap = <div>

     30 = USER
     30{
          userFunc = tx_extbase_core_bootstrap->run
          extensionName = News
          pluginName = Pi1

          switchableControllerActions {
            News {
                   1 = list
             }
          }

          view {
              templateRootPath = fileadmin/templates/ext/myExt/Templates/
              partialRootPath = fileadmin/templates/ext/myExt/Partials/
              layoutRootPath = fileadmin/templates/ext/myExt/Layouts/
           }

           settings < plugin.tx_news.settings
           settings {
              startingpoint = 9
              limit = 5
           }
      }

     40 = TEXT
     40.wrap = </div>
 }

This code worked for me in the past with previous versions of News and Typo3, now I just don't get it.

Any help of some sort would be very much appreciated. Thank you.

4

1 回答 1

1

As of version 3.0.0, EXT:news is using the layoutRootPaths, templateRootPaths and partialRootPaths instead of their singular variant. This enables you to only copy and modify the templates you really need to change instead of copying all. Have a look at the default settings.

So your configuration should respect the new default configuration:

view {
  templateRootPaths.200 = fileadmin/templates/ext/myExt/Templates/
  partialRootPaths.200 = fileadmin/templates/ext/myExt/Partials/
  layoutRootPaths.200 = fileadmin/templates/ext/myExt/Layouts/
}

EXT:news uses the key 100, so if you use anything greater than 100, your templates will have priority.

于 2015-01-29T08:48:18.403 回答