We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22716
    • 8 Posts
    I have a Ditto (version 2.0.3) call on one of my pages and the filter seems to act the contrary as expected.

    Here is the code : [!Ditto? &filter=`parent,43,1` ... This call makes all children of ID 43 document to be displayed as the 1 mode should be the not equal criterion.

    The other point is that this call : [!Ditto? &filter=`parent,43,1| parent,46,1` ... doesn’t display anything as it should display both children of the ID 43 and 46 documents, relying on the precedent behaviour.

    Can anyone help me on that topic ?

    Thanks !


    Pascal K.
      • 18397
      • 3,250 Posts
      You have a space between the pipe | and parent. Remove it and everything should work.
        • 22716
        • 8 Posts
        Quote from: Mark at Dec 03, 2007, 06:49 PM

        You have a space between the pipe | and parent. Remove it and everything should work.

        Hello Mark and thank you for the post. I have made the modification and it doesn’t change the display.

        Here is my code :

        [!Ditto? &filter=`parent,43,1|parent,46,1` &depth=`0` &randomize=`1` &display=`4` &extenders=`summary` &tpl=`dittoNews` &trunc=`1` &truncLen=`150` &truncOffset=`100` &truncText=` Lire la suite ...`!]

        and here is the corresponding HTML :

        [!Ditto? &filter=`parent,43,1|parent,46,1` &depth=`0` &randomize=`1` &display=`4` &extenders=`summary` &tpl=`dittoNews` &trunc=`1` &truncLen=`150` &truncOffset=`100` &truncText=` Lire la suite ...`!]

        This call doesn’t display any document wich confuse me as both - &filter=`parent,43,1` - and - &filter=`parent,46,1` - do.

        I don’t see my mistake.

        Thank you very much if you can help.

        Pascal K.
          • 11975
          • 2,542 Posts
          Hi

          You should try with

          &filter=`parent:46,47:7` &localFilterDelimiter=`:`

          or tags=`46,47` &tagMode=`onlyTags` &tagData=`parent`

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 9549
            • 93 Posts
            I’ve built a snippet that generates a Ditto (2.0.2) call within a document, depending on a submit form (see an early version here: http://modxcms.com/forums/index.php/topic,20450.msg134426.html#msg134426)

            Now, I have the same problem as Pascal. If my form demands several ID’s of the same search criteria it shows nothing. An example of a generated Ditto call could look like this...

            [Ditto? &startID=`2` &tpl=`ListArt` &summarize=`10` &paginate=`1` &extenders=`summary` &sortBy=`createdon` &sortDir=`DESC` &filter=`pagetitle,BodyCenter Ljungby|pagetitle,Body Joy|pagetitle,Bodystore Hälsokost`]]


            Shouldn’t this work by default? I also tried heliotrope solution but it doesn’t seem to work..

            By the way, I’ll look into tvExplorer soon, it seems promising. But I would like to nail this one first smiley
              • 11975
              • 2,542 Posts
              Hi,

              you should combine all the serached values in 1 unique filter:

              &filter=`datatosearch:value1,value2,value3:7`

              :-)
                Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
                • 9549
                • 93 Posts
                It still returns nothing sad "No documents found"

                [[Ditto? &startID=`2` &tpl=`ListArt` &summarize=`10` &paginate=`1` &extenders=`summary` &sortBy=`createdon` &sortDir=`DESC` &filter=`pagetitle:BodyCenter Ljungby,Body Joy,Bodystore Hälsokost:7` &localFilterDelimiter=`:`]]
                  • 9549
                  • 93 Posts
                  What am I doing wrong? heliotrope, Mark? smiley
                    • 18397
                    • 3,250 Posts
                    Give it a try without Bodystore Hälsokost. If I recall, Ditto 2.0.x had an issue with certain characters. If it works, try upgrading to Ditto 2.1b3 or later.
                      • 9549
                      • 93 Posts
                      Mark, I tried both. I used a call without any special characters and also updated to 2.1b3. Still don’t work! Is this working for others?


                      Sample call:

                      [[Ditto? &startID=`2` &tpl=`ListArt` &summarize=`10` &paginate=`1` &extenders=`summary` &sortBy=`createdon` &sortDir=`DESC` &filter=`pagetitle:BodyCenter Ljungby,Body Joy,Bodystore Halsokost:7` &localFilterDelimiter=`:`]]