We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25663 MODX Staff
    • 12,272 Posts
    feary try switching to the &display (replaces summarize) and &parents (replaces startID) parameters. Your call is written for earlier versions. See the ditto.modxcms.com site for more details on converting to the newer version.
      Ryan Thrash, MODX Co-Founder
      Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • 9549
      • 93 Posts
      Thanks for your reply. Can this be a bug? I did the adjustments for the new Ditto version in my call but it still renders nothing. Mmm.. tried both these calls:

      [[Ditto? &parents=`2` &depth=`0` &tpl=`ListArt` &display=`10` &sortBy=`id` &filter=`pagetitle,BodyCenter Ljungby|pagetitle,Body Joy`]]

      [[Ditto? &parents=`2` &depth=`0` &tpl=`ListArt` &display=`10` &sortBy=`id` &filter=`pagetitle:BodyCenter Ljungby,Body Joy:7` &localFilterDelimiter=`:`]]
        • 7231
        • 4,205 Posts
        I think that the problem is &depth=`0`. The docs say that it needs to be >= 1 so 0 could give an error.

        depth
        Purpose

        Number of levels deep to retrieve documents
        Options

        Any number greater than or equal to 1
          [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]
          • 9549
          • 93 Posts
          Nope, sorry. Removed depth, problem persist. If you try my call (with your documents of course), do you get the same problem?
            • 7231
            • 4,205 Posts
            It does not work. I did some checking and it seems that the 7 and 8 filters are switched.

            In the docs it says:
            7 does not contain the text of the criterion
            8 does contain the text of the criterion

            But it seems to be the other way around (version 2.02), at least to my understanding.

            This call worked for me on the demo site showing all documents except the two specified.
            [[Ditto? &parents=`0` &display=`10` &sortBy=`id` &filter=`pagetitle,Blog,8|pagetitle,Design,8`]]


            But with 7 it did not work (showing only those documents) returning "no documents found". You may want to try using the latest beta, I think it has many issues resolved.
              [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]
              • 11975
              • 2,542 Posts
              @Feary

              Does the tv contains multiples values ?
              If so the Filter 7 wil fail as it uses php strpos function.

              You could write your own filters through an extender.

              If you need an exemple I can post one of mine.

              :-)
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 9549
                • 93 Posts
                I’m using the pagetitle tv, so it should not contain multiple values. It would be nice if you post your extender! smiley

                Currently running Ditto 2.13b (r1462) and get the same results as dev_cw.
                  • 18397
                  • 3,250 Posts
                  1. &depth=`0` means unlimited depth. Please file a Ditto bug report to have the documentation corrected.
                  2. Remember:

                  Ditto allows you to use the &filter parameter to REMOVE UNWANTED DOCUMENTS. That is, any document that meets the criteria of the filter will be REMOVED from the output.
                  Thus, the code is working as intended.
                    • 11975
                    • 2,542 Posts
                    @Feary

                    here is a sample extender for custom filters.
                    It comes from tvExplorer.

                    :-)
                      Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                      • 18397
                      • 3,250 Posts
                      This should do the trick as parentFilter.extender.inc.php: (Note that this is untested)
                      <?php
                      
                      $filters["custom"]["parentFilter"] = array("parent","parentFilter"); 
                      
                      if (!function_exists("parentFilter")) {
                      	function parentFilter($resource) {
                      		if ($resource['parent'] == 43 && $resource['parent'] == 46) {
                      			return 0;
                      		} else {
                      			return 1;
                      		}
                      	}
                      }
                      ?>
                      

                      Add &extender=`parentFilter` to your call and it should only show documents with parents 43 or 46.

                      Theoretically, this could also be accomplished with tagging using &extenders=`tagging` &tagData=`parent` &tags=`43,46`&tagMode=`onlyTags`