We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18830
    • 161 Posts
    I`m writing a little snippet that will be included in a ditto chunk. This snippet will return the docgroup the document is belonging to. To do this I (i.e. the snippet smiley ) need(s) to know the ID of the Ditto document.

    $modx->documentIdentifier;


    in the Snippet returns the ID of the current document, not that of a document called by Ditto.

    Many thanks for any help.
      • 36416
      • 589 Posts
      Quote from: Mazso at Nov 26, 2008, 08:53 AM

      To do this I (i.e. the snippet smiley ) need(s) to know the ID of the Ditto document.
      $modx->documentIdentifier;

      in the Snippet returns the ID of the current document, not that of a document called by Ditto.

      Send it as a parameter:
       [!YourSnippet? &docid=`[+id+]`!] 
        • 18830
        • 161 Posts
        Well, of course. Thank you, Eol.