0

In old versions of typo3 this code worked but in latest version v11 it doesn't.The problem is that "this" value defined as "startingpoint" doesn't return current page id anymore.

lib.pageNews = USER
lib.pageNews {
  userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
  extensionName = News
  pluginName = Pi1
  vendorName = GeorgRinger
  switchableControllerActions {
    News {
      1 = list
    }
  }

  settings < plugin.tx_news.settings
  settings {
    startingpoint = this
    recursive = 99
    templateLayout = 100
    hidePagination = 0
    #limit = 10
    detailPid = 1075
    list.paginate.itemsPerPage = 20
  }
}

What is the "new" way to achieve this?

I tried to call that id in multiple ways like: TSFE:id, lib.currentPageId, TSFE:page|id, TSFE:page|uid, {TSFE:uid}, {TSFE:id}, getTSFE().id, .....

Uroš
  • 23
  • 1
  • 3
  • did you use `startingpoint.data = ...` or `startingpoint.insertData = 1`? – Bernd Wilke πφ Nov 17 '22 at 13:07
  • I used only startingpoint = something / using .data or .insertData giver me error: strlen(): Argument #1 ($string) must be of type string, array given – Uroš Nov 17 '22 at 13:47

1 Answers1

0

That is possible by using useStdWrap.

lib.pageNews {
  settings {
    useStdWrap = startingpoint
    startingpoint {
      data = TSFE:id
    }
  }
}

Source: https://github.com/georgringer/news/issues/542

Julian Hofmann
  • 2,081
  • 1
  • 8
  • 16