0
votes

How can I check if a page is a single view (ie for news) with the newly integrated symfony expression language in typoscript? I am searching for the equivalent of:

[globalVar = GP:tx_news_pi1|news > 0]

2

2 Answers

4
votes

Found it:

[request.getQueryParams()['tx_news_pi1']['news'] > 0]
3
votes
[traverse(request.getQueryParams(), 'tx_news_pi/news') > 0]
# This condition matches if current query parameters have tx_news_pi[news] set to a value greater than zero
[END]

(https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.4/Feature-85829-ImplementSymfonyExpressionLanguageForTypoScriptConditions.html#general-usage)