We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26113
    • 88 Posts
    I’m using Ditto to generate a listing of pages, nothing special.
    Using the [+date+] placeholder in my chunk, I get a standard date and time format which is fine. I read you can format this with dateFormat.

    But is date using the published date? When I use the [+pub_date+] placeholder it returns 0. If I use it in the content of the page it returns it fine.

    Should I not worry and continue using [+date+]?
    Thanks
    Rich
      • 7231
      • 4,205 Posts
      You can select where the +date+ gets its data from with the &dateSource parameter.

      By default it is looking at the createdon date.

      BTW - pub_date is only set if you use the publish date tool. It is not set automatically on publishing (don’t ask me why, it boggles me). So you can have a published document with no publish date.

        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Quote from: dev_cw at Oct 21, 2008, 05:01 PM

        BTW - pub_date is only set if you use the publish date tool. It is not set automatically on publishing (don’t ask me why, it boggles me). So you can have a published document with no publish date.
        Because that field was originally intended to only store the date you want the document published on if it’s not already published.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org