We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15688
    • 12 Posts
    I have a question regarding the organization of posts based on dates

    I have a PR posts that I am moving over to my new site that uses modx... I’m using ditto and reflect to do my PR list indexes and such but the date that is associated with the post is the current date. I backdated the posts using publish date, but on new posts I don’t see any reason to set this. When I told Reflect to sort by &dateSource=`pub_date` then all my new posts are showing up as dec 1969. Is there a way to have a "fall back" so if there is no pub_date, to tell reflect to use createdon date? If I don’t set pub_date then all my PR posts show up with dates from last week when I moved them into modx.


    Thanks
      • 36592
      • 970 Posts
        • 15688
        • 12 Posts
        Eeek, reported 5 months ago and no fix huh . Oh well.

        I guess for now I will have to tag all new posts with a publish date.
          • 36592
          • 970 Posts
          In addtion to the &dateSource parameter, you can add ’sortBy’ in the &dittoSnippetParameters like this...
          [!Reflect? &config=`wordpress` &getDocuments=`1` &dittoSnippetParameters=`parents:2|sortBy:pub_date` &dateSource=`pub_date` &monthSortDir=`DESC` &tplMonth=`reflect_month_tpl`!]