Markus Dübbert
Markus Dübbert

Reputation: 213

Ext. news: get news id in controller

I want to place a new plugin (from own extension) on the news detail page, which shows me news from related categories.

My problem is: How to get the news id in my new plugin controller.

$arguments = $this->request->getArguments();

does not work.

Has anybody an idea?

Upvotes: 0

Views: 279

Answers (2)

Pravin Vavadiya
Pravin Vavadiya

Reputation: 3207

You can use below TYPO3 GeneralUtility::_GP() function for get another extension arguments in your own extension Controller file. Like below

$newsArr = GeneralUtility::_GP('tx_news_pi1');
$this->newsUid = intval($newsArr['news']);

Upvotes: 1

Georg Ringer
Georg Ringer

Reputation: 7939

You need to use GeneralUtility::_GET for that

Upvotes: 1

Related Questions