Twig 设置内容/选择日期

Twig 设置内容/选择日期,twig,where,bolt-cms,Twig,Where,Bolt Cms,博尔特的文档说明了你可以使用几个“快捷方式”来实现什么 选择日期在过去或将来的记录。"内部",, Bolt为此使用strtotime()函数,因此我们参考其手册 详情请参阅第页。“ 因此,我尝试在setcontent='something'中使用date\u modify(),其中{}不起作用 下面是我试图做的: {% setcontent = 'showtimes' where { datefield: '>tomorrow && <"tomorrow"|da

博尔特的文档说明了你可以使用几个“快捷方式”来实现什么 选择日期在过去或将来的记录。"内部",, Bolt为此使用strtotime()函数,因此我们参考其手册 详情请参阅第页。“

因此,我尝试在
setcontent='something'中使用
date\u modify()
,其中{}
不起作用

下面是我试图做的:

{% setcontent = 'showtimes' where
   { datefield: '>tomorrow && <"tomorrow"|day_modify("+1 day")' }
 %} 
{%setcontent='showtimes'其中

{datefield:'>明天&&不幸的是,你想做的事情并不那么简单

您不能以这种方式修改快捷方式。明天的“快捷方式”仅在setcontent中起作用,因此您尝试使用细枝过滤器“明天”| day_modify(“+1天”)修改它的部分将不起作用

您可以尝试以下方法,但我不确定是否有效:

{% setcontent = 'showtimes' where { datefield: '>tomorrow && <+2 days'  
%}
{%setcontent='showtimes'其中{datefield:'>明天和明天&&
{% set day_after_tomorrow = "+2 days"|date("Y-m-d") %}
{% setcontent = 'showtimes' where { datefield: '>tomorrow && <' ~ day_after_tomorrow %}