有没有办法在视图模板中取消设置FatFree变量


Is there a way to unset a FatFree variable inside a view template?

我知道您可以使用<set name="John" />设置F3变量,但我想知道是否有类似<unset foo />的东西。我希望能够在视图模板中执行此操作。我在网上找遍了,但什么也没找到。。。

没有这样的<unset>指令。但您可以使用以下两个选项之一实现相同的效果:

  • <set foo="{{NULL}}"/>
  • {~ unset($foo) ~}