【问题标题】:MIGX Event CalendarMIGX 活动日历
【发布时间】:2016-03-07 13:35:22
【问题描述】:

我创建了一个具有以下结构的自定义事件日历:

- 事件 1(Modx-Ressource 1)

  • 日期/时间 1(Migx-TV-Record)(即 01-02-2016)
  • 日期/时间 2(Migx-TV-Record)(即 01-03-2016)
  • ...

- 事件 2(Modx-Ressource 2)

  • 日期/时间 1(Migx-TV-Record)(即 01-04-2016)
  • 日期/时间 2(Migx-TV-Record)(即 01-01-2016)
  • ...

这意味着 Modx-Ressource 有一些关于事件的信息(如 Ticketprice、Description、Title...)和多个 Eventdates/-times 存储在 Migx-TV 中。

到目前为止工作...但是我尝试制作一个可以按日期、限制等排序的输出...也许输出如下所示:

  • 事件 2,日期/时间 2(即 01-01-2016)
  • 事件 1,日期/时间 1(即 01-02-2016)
  • 事件 1,日期/时间 2(即 01-03-2016)
  • 事件 2,日期/时间 1(即 2016 年 1 月 4 日)

我怎样才能完成这项工作?对不起我的英语不好。

【问题讨论】:

    标签: modx migx


    【解决方案1】:

    使用 MIGX getImageListsn-p 可以排序和过滤:

      [[!getImageList?
        &tvname=`YourEventsTV`
        &tpl=`YourEventTpl`
        &sort=`[{"sortby":"your_event_start_date","sortdir":"asc"}]`
        &where=`{"your_event_limit:>=":"100"}`
      ]]
    

    添加排序子句或 where 子句(两者都使用 JSON 字符串)。 MODX 手册有更多关于all the options available 的信息。

    【讨论】:

      猜你喜欢
      • 2014-03-24
      • 1970-01-01
      • 1970-01-01
      • 2015-06-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-04
      相关资源
      最近更新 更多