We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5727
    • 160 Posts
    Howdy people,

    I’m looking for a way to list only the first child of every documents for a certain parent. I’ve been thinking, searching and trying different parameters without success. I’m wondering if there’s an easy way to do this that I haven’t thought. Could this be done with a filter or some other advanced features that I don’t know about? Here’s a sample of my document structure:

    => Category Listing
     * Category 1
      - Article 1
      - Article 2
      - etc.
     * Category 2
      - Article 1
      - Article 2
      - etc.
     * etc.
    


    So my Ditto call would be in Category Listing and would show a summary of Article 1 of each Category.

    Could this be done with Ditto or should I create my own snippet?

    Thanks in advance for all your help!
      Olivier Deland
      Montreal, Canada - Web Developer
      • 18830
      • 161 Posts
      If the number of your categories won´t change, you could put several Ditto calls in your main page, one for every category.
        • 18397
        • 3,250 Posts
        You could also write a simple snippet to get the IDs of the immediate children of Category Listing and then write a Ditto call for each.
          • 5727
          • 160 Posts
          Thanks for your tips & hints guys, I’ll try to work something out with that.

          Cheers!
            Olivier Deland
            Montreal, Canada - Web Developer