TYPO3 9.5:评估打字稿库的流体条件

问题描述 投票:0回答:1

在TYPO3 8.5中,我经常使用这样的流体条件:

<f:if condition="{f:cObject(typoscriptObjectPath: 'lib.cookiepid')}">

在TYPO3 8.5中,如果不需要,我没有定义lib(取决于某些页面pids,例如f)。

TYPO3 9.5引发错误:

#1540246570 TYPO3Fluid\Fluid\Core\ViewHelper\Exception
No Content Object definition found at TypoScript object path "lib.cookiepid"

在TYPO 9.5中,当我在TS中定义此库时,我只能避免此错误。

避免这种错误的最佳做法是什么?是否可以不重写很多代码?

migration typo3 conditional-statements typoscript fluid
1个回答
1
投票

如果我希望它为假,则将其设置为以下内容:

lib.cookiepid = TEXT
© www.soinside.com 2019 - 2024. All rights reserved.