We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30194
    • 14 Posts
    [[Ditto?parents=`16`&display=`5`&depth=’0’]]

    Currently I am using the code above for a latest news area of my sidebar. I want it to display my most recent articles in the second level.

    Articles is id 16
    PPC Articles is id 21
    PPC 1 is id 22
    SEO Articles is id 20
    SEO 1 is id 17
    SEO 2 is id 18
    SEO 3 is id 19

    I would like to have the latest news display new articles but not any document created in Articles (so right now just have it display PPC 1, SEO 1, SEO 2, & SEO 3... when I add new categories in Articles I dont want it to pick up on it. Is this possible? using the filter parameter maybe?

    Thank you for any thoughts.
      • 7231
      • 4,205 Posts
      Not sure I understood but to get only documents under PPC and SEO Articles you could try this:
      [[Ditto? &parents=`21,22`&display=`5`&depth=`0`]]


      Also you have single quotes ’ in the depth parameter rather than backticks `. By using single quotes the depth parameter was not being acivated,

      Another option if what you want is to omit the container documents and only ionclude the children is to use the &hideFolders=`1` parameter:
      hideFolders
      Purpose: Don’t show folders in the returned results
      Options:
      0 keep folders
      1 remove folders

      The call would then be:
      [[Ditto? &parents=`16` &display=`5` &depth=`0` &hideFolders=`1`]]
        [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]
        • 30194
        • 14 Posts
        Thank you that worked perfectly, I have so much to learn smiley