如何在 TYPO3 6.2 中取消 f:if 条件?

How to negate f:if condition in TYPO3 6.2?

我有一个 TYPO3 6.2 实例……是的,我知道它已经过时了,我在迁移中并行工作;)

我有这个 if 语句

<f:if condition="{v:var.get(name: 'access', useRawKeys: 1)}">

有没有办法在 TYPO3 6.2.31 中否定这个声明?

提前致谢

TYPO3 6 和 7 中的条件评估非常基本:没有 not
not-Viewhelper中也没有内置,你可以自己写。

但是您可以轻松使用 <f:else> viewhelper,不需要 <f:then>:

<f:if condition="{v:var.get(name: 'access', useRawKeys: 1)}">
  <f:else>
     : do anything if condition is false
  </f:else>
</f:if>

你的意思是,如果没有"access"参数?

<f:if condition="{v:var.get(name: 'access', useRawKeys: 1)}">
   <f:else>
       ###your code if there is no access in the URL##
   </f:else>
</f:if>