We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12379
    • 460 Posts
    I’d like the folders/containers that hold the Ditto articles are in to appear as a simple subhead above the group of articles.

    How do I do that?

    Currently, with the folders hidden, my code reads:

    [[Ditto?startID=`88`&depth=`3`&display=`8`&hideFolders=`1`&seeThruUnpub=’1’&showPublishedOnly=’1’&tpl=`DittoTemplate`]]


    eg:

    August
    Article 1
    Article 2
    Article 3

    September
    Article 1
    Article 2
    Article 3
      Mostly harmless.
      • 3707
      • 241 Posts
      I’m not sure if this would work the way you want but you could try adding a tplFirst parameter to your ditto call
      [[Ditto?startID=`88`&depth=`3`&display=`8`&hideFolders=`1`&seeThruUnpub='1'&showPublishedOnly='1'&tpl=`DittoTemplate`&tplFirst=`firstDittoTemplate`]]

      In the tplFirst chunk you could include the getField snippet http://modxcms.com/getField-667.html to return the parent title.
      [!GetField?parent=`1`!]
      ...the rest of your chunk...

      I haven’t used the getField snippet so I’m not sure if that will suffice.

      Alternatively, if you want to group the articles by month as in your example, have you tried using Reflect?