We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49667
    • 59 Posts
    I have two templates, one for home-page, and the second one for category resources.

    The category resources (they all have multiple children articles) are:
    id=2 --> News
    id=3 --> Sports
    id=4 --> Lifestyle
    id=5 --> Business
    etc.

    My home-page uses Wayfinder for the menu navbar:
    [[Wayfinder? &startId=`0` &level=`1`
                        &outerTpl=`template_navbar`]]


    All the four categories (id=1,2,3,and 4) use the same "template_categories".
    Inside "template_categories" I have this Ditto call so the user can read the full articles:

    [[Ditto? &parents=`2` &display=`all` &orderBy=`createdon DESC`
        &tpl=`template_categories`]]


    But when a user clicks "Sports" in my menu navbar, all the "News" articles (id=2) show, and the same "News" articles show when a user navigates to "Business" (id=5).
    I know that this happens because I specified "&parents=`2`" in my Ditto call, but how can I use the same template "template_categories" and enable the user to read the full articles for each corresponding category in my menu navbar??? (I really don´t want to create separate templates for each of my category resources... sad).

    Thank you for your help.

    This question has been answered by sottwell. See the first response.

    [ed. note: ronbonqqq last edited this post 11 years, 8 months ago.]
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Try &parents=`[*id*]` so that Ditto uses the selected category resource as the parent?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 49667
        • 59 Posts
        Brilliant, it works! Thank you very much... smiley