MIGX Event Calendar

332 Views Asked by At

I have created a custom Eventcalendar with the following structure:

- Event 1 (Modx-Ressource 1)

  • Date/Time 1 (Migx-TV-Record) (i.e. 01-02-2016)
  • Date/Time 2 (Migx-TV-Record) (i.e. 01-03-2016)
  • ...

- Event 2 (Modx-Ressource 2)

  • Date/Time 1 (Migx-TV-Record) (i.e. 01-04-2016)
  • Date/Time 2 (Migx-TV-Record) (i.e. 01-01-2016)
  • ...

That means that the Modx-Ressource has some Information about the Event (like Ticketprice, Description, Title...) and multiple Eventdates/-times stored in a Migx-TV.

That worked so far... But i try to make a Output which i can sort by date, limit and so on... Maybe the output looks like this:

  • Event 2, Date/Time 2 (i.e. 01-01-2016)
  • Event 1, Date/Time 1 (i.e. 01-02-2016)
  • Event 1, Date/Time 2 (i.e. 01-03-2016)
  • Event 2, Date/Time 1 (i.e. 01-04-2016)

How can i get this done? Sorry for my bad English.

1

There are 1 best solutions below

0
On

Using the MIGX getImageList snippet you can sort and filter:

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

Add a sort clause or a where clause (uses JSON strings for both). The MODX manual has some more information on all the options available.