We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3349
    • 126 Posts
    I have the following structure setup in my site. It had different Regional news and event pages.

    Region1
    News
    News Item 1
    News Item 2
    Events
    Event Item 1
    Event Item 2
    Region2
    News
    News Item 1
    News Item 2
    Events
    Event Item 1
    Event Item 2
    Region3
    News
    News Item 1
    News Item 2
    Events
    Event Item 1
    Event Item 2
    .
    .
    .
    .
    .
    .and so on....

    Question: I want to use one template for each Region page that pulls through the news and event items for that specific region. How do I use a ditto call in my template (without referring to specific parent ID's) that can do this generically?

    Hope this is understandable!

    bS
      • 22427
      • 793 Posts
      Assuming that in fact your structure is hierarchical:
      Region1
      ---News
      ------News Item 1
      ------News Item 2
      ---Events
      ------Event Item 1
      ------Event Item 2
      Region2
      ---News
      ------News Item 1
      ------News Item 2
      ---Events
      ------Event Item 1
      ------Event Item 2

      Then the Ditto call in the template for a Region just needs the parameter &parents=`[*id*]` to collect its children. Use the &depth parameter to control how many sublevels you want to include..