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

    I have set my homepage documents to something like this:

    TALKS (2)
    |--Category-1 (3)
        |---Post-1_1 (8)
        |---Post-1_2 (9)
        |---Post-1_3 (10)
    |--Category-2 (4)
        |---Post-2_1 (11)
        |---Post-2_2 (12)
        |---Post-2_3 (13)
    |--Category-3 (5)
        |---Post-3_1 (14)
        |---Post-3_2 (15)
        |---Post-3_3 (16)
    |--Category-4 (6)
        |---Post-4_1 (17)
        |---Post-4_2 (18)
        |---Post-4_3 (19)
    |--Category-5 (7)
        |---Post-5_1 (20)
        |---Post-5_2 (21)
        |---Post-5_3 (22)


    Now I want on my homepage (id-1) to show in descending order, only the posts from the folder Talks.
    I’ve tried several Ditto calls, but no matter what I do it still does not show me the correct results.

    Here some examples:
    [[Ditto? &startID=`3,4,5,6,7` &total=`all` &summarize=`all` &depth=`10` &showPublishedOnly=`1` &removeChunk=`Comments,FormBlogComments` &tpl=`DittoTemplate` &paginate=`0` &paginateAlwaysShowLinks=`0`]]

    This will show me only 3 (??) results. Made an echo of the SQL, it selects only the children of one category. Why? I don’t know huh

    [[Ditto? &startID=`2` &parents=`3,4,5,6,7` &total=`all` &summarize=`all` &depth=`10` &showPublishedOnly=`1` &removeChunk=`Comments,FormBlogComments` &tpl=`DittoTemplate` &paginate=`0` &paginateAlwaysShowLinks=`0`]]

    This will show me all posts from all categories (=good), but also the categories (=bad).

    I know I could use tags instead of these categories, and sort them accordingly, but I want to have this structure with parents and children because on each category page there’s gonna be other content too.

    Thank you for any help grin
    Boby


    PS: Before I forget... MODx 0.9.5 and Ditto 2.0.0 final
      ...my Photo Gallery on Flickr...
      • 18397
      • 3,250 Posts
      Give this call a try

      [[Ditto? &parents=`2` &hideFolders=`1`  &summarize=`all` &depth=`10` &removeChunk=`Comments,FormBlogComments` &tpl=`DittoTemplate`]]
      


      Almost forgot. If this does not help, append &debug=`1` to each of the calls and choose save debug console. Then post those files here as an attachment. Thanks smiley
        • 3763
        • 155 Posts
        That did it laugh
        Thanks a lot Mark!


        I have one more question.. .I’ve asked this in the past and it worked so far, but now it doesn’t anymore.
        When I browse a category page, I want to show also the posts inside it. I’ve created a chunk that makes the Ditto call so if I make a change, I do it only once.

        Seems like [*id*] doesn’t gives Ditto the current DocumentID.
        I am using this, from your example above:
        [[Ditto? &parents=`[*id*]` &hideFolders=`1` &summarize=`all` &depth=`10` &dateFormat=`%B %d, %Y` &removeChunk=`Comments,FormBlogComments` &tpl=`DittoTemplate`]]



        Boby


        EDIT:
        I found the secret laugh looking at the Ditto snippet. Completely removed &parents=`[*id*]` from the call because it will automatically get it. Smart Snippet wink

        Thanks anyway!
          ...my Photo Gallery on Flickr...