We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18331
    • 20 Posts
    Hello everyone,

    I want to make upcoming events to show on first page by using ditto. If event is in the past when it’s not showing, also limited to 3 upcoming events.

    I used this ditto call:

    [!Ditto? &startID=`29` &showPublishedOnly=`0` &summarize=`3` &dateFormat=`%Y %m %d` &dateSource=`pub_date` &sortBy=`pub_date` &noResults=’Nothing’ &sortDir=`asc` &filter=`pub_date,@EVAL return strtotime(’0 day’);,3` !]

    So it sorting everything by publishing date, show 3 upcoming events and working fine. I want to make sortby the pagetitle, which is the date, let’s say "2010 01 01". I set &sortBy=`pagetitle` AND it sorts everything perfectly, but filter ( &filter=`pagetitle,@EVAL return strtotime(’0 day’);,3` } is showing no results. What should i change in filter to make it work?

    Thanks for the help!