【问题标题】:How can I show only resources that are published in the future (Modx)?如何仅显示将来发布的资源(Modx)?
【发布时间】:2016-02-19 20:13:47
【问题描述】:

如何仅显示今天和将来发布的资源?

类似:

[[!getResources? 
&parents=`5` 
&where=`publishedon => [[dateToday?]]`
&tpl=`calendar` 
&includeContent=`1`]]

dateToday sn-p:

<?php
return date("Y-m-d");

我想知道这个语句的正确写法:

 &where=`publishedon => [[dateToday?]]`

【问题讨论】:

    标签: modx


    【解决方案1】:

    我找到了解决办法:

    &where=`{"publishedon:>":[[!stringToTime? &input=`0 days`]]}`
    

    【讨论】:

      猜你喜欢
      • 2016-04-18
      • 2014-12-29
      • 2016-06-13
      • 1970-01-01
      • 2013-11-11
      • 2014-02-12
      • 2012-08-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多