We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29181
    • 480 Posts
    I’ve hit a problem, and aren’t sure what the solution is. I’m pretty sure I’ve done this befoer, but I can’t seem to find out where I am going wrong.

    I’m using:
    [!Ditto?&parents=`4` &debug=`1` &depth=`0` &tpl=`quickLinksTpl`&display=`all`&filter=`DisplayInDropDown,1,1`!]


    but have similar calls with &parents set to 2 and 3 also. These are the three "top levels" of my navigation. The client has an option to select whether they want a link posting in a dropdown to a certain page of interest.

    All 3 different calls are returning the exact same results. I turned on debug and it is accepting the parameters for &parents correctly.

    According to http://ditto.modxcms.com/files/snippet-ditto-php.html#parents that is what the parameter should do, unless I have misinterpreted it.

    The page with the debug console can be found at www.ahcforme.org
    Hopefully someone can point me in the right direction.

    Thanks for any help,
    Taff

    EDIT: After quite a lot of testing and reading the forums it would appear to be working. I cannot however tell you exactly what it came down to. Even though I don’t have PhX installed I still uncached the page and loaded the snippet cached. This is not a problem as all the information is being called uncached and then imported with some AJAX.

    This alone did not appear to solve the error.

    Even though I only have one call on each of those pages I added an id parameter thinking that there was possibly a conflict on the page where they are all being called.

    This alone did not appear to solve the error.

    Changing the depth to something other than 0 would change the output of Ditto. Changing it to for example 5 fixed the issue so that it displays the correct item depending on the parents tag. Changing it to 10 however did not change anything.

    This combination of changes would appear to have fixed it, at least for me.

    Hope me babbling on helps someone else sometime (possibly me again knowing my memory tongue)
      Adrian Lawley: www.adrianlawley.com