We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22673
    • 72 Posts
    I have been looking around for an answer to this for a while but I’m not getting anywhere.

    I have a parent page on my site which lists a number of child documents using Ditto. I would like to be able to seperate these child documents under 3 different headings on the parent page. Ideally, new child documents can be added in future under any of the 3 headings.

    I presume the &parents parameter is used somehow.

    Any help would be much appreciated.

    Alex.
      • 22770
      • 285 Posts
      Try setting up a template variable (use checkbox/radio box/dropdown menu as appropriate). Use something like:
      Option A||Option B||Option C

      as your Input option values.

      Then, for each section of the page, use a ditto call that filters according to the value of the TV. So, you might have:
      &filter=`optionsTV,Option A,7`

      in the ditto call, where optionsTV is the name of your template variable.

      You could also use tagging instead, but I think the above option works better for your case.
        • 22673
        • 72 Posts
        Thanks Patrick, that works beautifully - however I have left out the number at the end of the filter call, in your example you put "7", what was this for? And does it matter if i’ve left it out? Seems to be working without it.

        Thanks.
          • 22770
          • 285 Posts
          The number tells ditto how to filter. The number 7 means ’includes the text’, so it includes the text ’Option A’. I think the filter defaults to ’equal to’, which should also work. I tend to use 7 because it saves typing out the whole text if I’m doing a more complex TV.
            • 22673
            • 72 Posts
            Patrick you are a legend. Thanks for the help smiley