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

    It seems that if I sortBy pub_date but a page doesn’t have a published date - it thinks the pub_date is the epoch instead of the created date.

    Can anyone confirm that this is what is happening? Is it supposed to be?

    Thanks
      • 18397
      • 3,250 Posts
      This is an issue with MODx itself as it does not set a pub_date by default. I removed the complex SQL query that replaced those with the createdon value in Ditto 1.0.2. I *hopefully* plan on adding this back in as a php function in 1.0.3.
        • 25663 MODX Staff
        • 12,272 Posts
        Mark can you check the SVN trunk to see if this issue with Pub Date is set? I think we’ve changed this recently in prep for the next release. If not, please making a suggestion to the rest of the core team. Thanks!
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 33101
          • 46 Posts
          Quote from: Mark at Jul 16, 2006, 06:44 PM

          This is an issue with MODx itself as it does not set a pub_date by default. I removed the complex SQL query that replaced those with the createdon value in Ditto 1.0.2. I *hopefully* plan on adding this back in as a php function in 1.0.3.

          Thanks for confirming what was happening. Can you just select both the pub and created date and if pub is null/0 use the created date? I haven’t looked at the code yet but it seems it would just be one line added:

          $pub_date=$pub_date?$pub_date:$created_date;


          Is it not so simple?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            It appears that Ditto does not honor the seeThroughUnpub option; it will "see" through an unpublished folder in any case. Looking at the code, I tracked the value all the way to where the actual documents are retrieved, and I don’t see where it is used at all. In the getAllSubDocs function, it should be passed to the getChildIds function, where it would be used to determine whether to loop through a folder or not, depending on if it were published or not.

              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
              • 3984
              • 22 Posts
              Hey

              Feel really stupid asking this, but can someone provide me with a really simplified tutorial for setting up Ditto from scratch. Maybe I’m having one of those days, I’ve looked through the majority of the threads and the website documentation but still having no success.

              Cheers
                • 18397
                • 3,250 Posts
                Tutorial:

                1. Create a folder. Note its ID.

                2. Create numerous documents within this folder.

                3. On either a separate page or the folder insert a Ditto call like so:

                [[Ditto?startID=`IDofFolder`]]
                


                Thats it! You can use any of the parameters to alter the output to your liking. A full reference is available in the Documentation > Core Snippets > Ditto section of the MODx CMS site.
                  • 27285
                  • 29 Posts
                  How can I write a tv to select a filter which has the output of a certain word (e.g. MPC)?

                  and

                  Is &filter=`tvFilter,MPC,1` right?
                    • 18397
                    • 3,250 Posts
                    If you are saying that you wish to remove the documents with the value of Filter being MPC then your filter parameter is correct.
                      • 23044
                      • 20 Posts
                      Quote from: Mark at Jul 18, 2006, 08:45 AM

                      Tutorial:

                      1. Create a folder. Note its ID.

                      2. Create numerous documents within this folder.

                      3. On either a separate page or the folder insert a Ditto call like so:

                      [[Ditto?startID=`IDofFolder`]]
                      


                      Thanks
                      Thats it! You can use any of the parameters to alter the output to your liking. A full reference is available in the Documentation > Core Snippets > Ditto section of the MODx CMS site.


                      I’ve followed you instructions but I get "No entries found". I’m sure its something simple but I just don’t see it. I’ve created a folder but should it be published? Should the documents inside the folder be children of the folder? Can you expand a little. I’m sure this is simple to a seasoned MODx user but some detailed step-by-step configuration instruction would certainly help.

                      Also, I’m assuming that the snippet call params should be separated by a space, right?

                      This discussion is closed to further replies. Keep calm and carry on.