We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18331
    • 20 Posts
    Could you please give me example where should i insert the id and what syntax i should use for that. Just let’s say ’13’ as uparent??

    And another question. How could i use this script (if it is possible) to get random ditto item?

    Thank you!
    • Ditto has the &randomize parameter.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 18331
        • 20 Posts
        Oh, i forgot about randomize parameter:))

        And found the syntax for that code, it should be:

        $rsContent = $modx->db->select("id,content", "modx_jot_content", "uparent=’13’ AND published=1", "RAND()", "1");

        Thank you all for your help!