简体   繁体   中英

In typo3 news typoscript, how do I set startingpoint to current page ID?

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, .....

That is possible by using useStdWrap .

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM