We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    Hi,
    I’m having some serious issues with a ditto call not accepting a parent parameter.

    [!Ditto? &tpl=`contentTpl` &extenders=`summary` &parents=`265` &debug=`1` &depth=`0` &display=`8` &id=`NewsContent`!]


    Not matter what id I place in the &parents parameter I keep getting the last 8 results from the entire site.

    As you can see at http://www.ahcforme.org/index.php?id=264 it is returning pages from the parent of id92.

    I’ve tried calling the snippet and the page uncached and every combination possible. I also tried startId, startID as I remember those still working from the ditto 1 days.

    The downside is that I don’t have access to the database and the webserver is Windows running Apache. I have had all sorts of issues slowing development to a standstill on more occasion than once. The site is meant to go live at midnight in the USA....and I am at a loss as to what the problem is.

    Can anyone see where I am going wrong?

    A beer to anyone who can point me in the right direction.
    Taff
      Adrian Lawley: www.adrianlawley.com
      • 7231
      • 4,205 Posts
      Have you tried putting the parents at the beginning of the call? It should not make any difference but who knows?
        [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]
        • 6726
        • 7,075 Posts
        Which version of Ditto ?

        If it’s 2.1 there seems to have been a LOT of changes maybe check out the parameters...
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l'outil id
          • 36582
          • 463 Posts
          Taff - are your child documents containers? I had a similar problem and couldn’t work it out until I gathered the child documents into one container and then made the call from that container instead of the one above it. In other words it didn’t seem to want to list documents, using the &parents call, if they themselves were containers. I don’t know if I’m using that call wrongly or perhaps the documentation is confusing me a little. I also had &depth=`1` by the way.
            Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
            • 6726
            • 7,075 Posts
            Indeed if your documents are splitted into several subfolders you can either add &depth=`2` and &hideFolders=`1`. It will work but only if the documents you want displayed aren’t folders (uh, containers) themselves.

            If the level 2 documents are folder, then just add all level 1 folders to &parents, IDs separated by commas.
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 29181
              • 480 Posts
              I also had the idea of moving the parameters and arranging them differently.
              Thanks for the idea with the child documents, that is something I had not even thought of. Unfortunately that was not the case.
              I’m using Ditto version 2.0.2

              I had cleared the cache even though I was calling the snippet and the page uncached and all possible combinations to no avail.
              I actually left this part of the site for a while after becoming totally lost.

              I just checked back and it seems to be working...which is weird, because it wasn’t yesterday.

              Thank you all for help in the fault finding, and if I ever find out what the problem was I will let you know....one of those errors you wouldn’t wish your worst enemies.

              Taff
                Adrian Lawley: www.adrianlawley.com