We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4080
    • 139 Posts
    I've upgraded a site from Revo 2.0.6 to 2.2.4-pl and it looks like Ditto is no longer an option? It's how I constructed the blog functionality and I have a suspicion that I need to convert everything to getResources (not sure how hard that is). Or perhaps converting everything to Articles is a better route? Thanks in advance for input.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      No, Ditto has been deprecated for Revo in favor of getResources. There are some differences, but the principle is the same, so I've found it easy enough to switch from one to the other. For example, a plain listing might look like this in Ditto
      [[Ditto? &parents=`42` &tpl=`myTpl`]]

      Same thing in getResources
      [[getResources? &parents=`42` &tpl=`myTpl`]]


      This is a handy link to keep around.

      http://rtfm.modx.com/display/ADDON/getResources

      Articles is nice, but not as flexible, so depending on what you're doing Articles may or may not be the solution for your situation. [ed. note: sottwell last edited this post 14 years, 2 months ago.]
        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
        • 3749
        • 24,544 Posts
        If it's a blog, Articles may give you a lot more control and options, though it will take longer to convert. As Susan says, converting Ditto to getResources is very easy and getResources is usually faster.


        ------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using.
        MODX info for everyone: http://bobsguides.com/modx.html
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 4080
          • 139 Posts
          Instant replies from MODX Top Guns. Thanks you two!

          This is very helpful. Given the project I think the faster route of getResources makes more sense. For some reason though I can get any output with the snippet call. Which for starters looks like this:

          [[!getResources? &parents=`7` &tpl=`home-blog-list-tpl`]]


          There seem to be traces of Ditto in my install (http://cl.ly/image/2J0L1S0s1Q3D) and the following was showing up in the MODX error log but now it stopped for whatever reason:

          [2012-08-14 20:08:41] (ERROR @ /index.php) Ditto 2.1.0 - /Applications/MAMP/htdocs/etiquetteprinciples/core/components/ditto/lang/english.inc.php 


          Any ideas on how to best troubleshoot getResources giving no output? I did try reinstalling it in Package Management as well as a complete forced package removal followed by a fresh install. Also, the MODX error log is empty when I load the page where getResources is being called.
            • 3749
            • 24,544 Posts
            Make sure the resource with the ID of 7, and its children, are published, not hidden from menus, and not protected by any permission rules.


            ------------------------------------------------------------------------------------------
            PLEASE, PLEASE specify the version of MODX you are using.
            MODX info for everyone: http://bobsguides.com/modx.html

            [ed. note: BobRay last edited this post 14 years, 1 month ago.]
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 4080
              • 139 Posts
              Sorry to have disappeared there for awhile and thanks for your last reply, Bob.

              So it was the fact that the blog posts (as resources back before the Articles extra existed and was using Ditto) had Hide From Menus checked. Duh. Simply &showHidden in the getResources call and voila, I'm back in business. The call now looks like this:

              [[!getResources? &parents=`7` &tpl=`blog-list-tpl`]]


              Related thread: https://forums.modx.com/thread/43556/getresources-and-menus

              Thanks again all! The MODX community rocks.
                • 39932
                • 483 Posts
                Just a Note:

                This behavior hasn't changed in Articles either, FWIW. Articles extra hides Articles by default. Just letting you know, in case you run into the problem again.
                  Website: Extended Dialog Development Blog: on Extended Dialog
                  Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
                  Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

                  Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".
                  • 4080
                  • 139 Posts
                  Ah yes, makes sense. Thanks!