We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21949
    • 7 Posts
    What would be the te best way to display a list of upcoming events on a website driven by MODx? I know there are certain snippets available, but I don’t need a calendar interface. I just need a simple list containing information about each event that can be styled using css.

    Thanks smiley
      • 4172
      • 5,888 Posts
      if your events are modx-resources you can use Ditto.

      Try something like that if you have pub_date as eventDate to filter all events which are in the past:

      [!Ditto? &showPublishedOnly=`0` &dateSource=`pub_date` &sortBy=`pub_date` &sortDir=`asc` &filter=`pub_date,@EVAL return strtotime('-1 day');,3`  .......more Ditto-parameters.......!]


      or if you have a TV eventDate

      [!Ditto? &showPublishedOnly=`0` &dateSource=`eventDate` &sortBy=`eventDate` &sortDir=`asc` &filter=`eventDate,@EVAL return strtotime('-1 day');,3`  .......more Ditto-parameters.......!]


      or use pub_date as event_date and let Ditto show only published documents (default):
      [!Ditto? &dateSource=`pub_date` &sortBy=`pub_date` &sortDir=`asc` .......more Ditto-parameters.......!]


        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 18913
        • 654 Posts
        I found a PHP app called Basic Events, pulled the guts of it into MODx and used LoopDBchunk (after editting it) to format the output. I had not wanted to have the events data kept in the MODx database, so this all dealt with an external MySQL database. "Basic Events" can also be used "standalone". But it’s login code and user management code is not necessary in the context of MODx.
        MattC