We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26982
    • 75 Posts
    I’ve read the docs at http://ditto.modxcms.com/files/snippet-ditto-php.html - but I can’t see how I can output a link to the parent document of my links.

    ie: if I have a document called "Products" with three children which I am outputting with a depth of 1, then I can easily get Ditto to display the three child docs. However, above these links it is common to have a header link, saying "Products", which links to that doc.

    I see there is a [+parent+] placeholder in Ditto’s templating system, but this only accesses the ID, not the name.

    Alternatively, is there a parameter I can send Ditto that asks it to output the parents, as well as the current depth?

    Thanks,

    /\dam
      • 17883
      • 1,039 Posts
      Search for "getfield snippet". Should work.
        • 26982
        • 75 Posts
        Thanks, I’ll take a look.

        Are there any plans to incorporate some means of getting parent information via a single ditto call? This would seem to be a common requirement. Maybe via an extra parameter called something like "get_parent_data" - which if set would open up some new template options?

        Cheers,

        /\dam