We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    I have been fooling around with dropdown template variables to select an associated document.

    my tree is currently set up like the following:

    food (10)
    - Breakfast (12)
    -- recipe 1 (15)
    -- etc...
    - Lunch (13)
    -- recipe 2 (16)
    -- etc...

    I propagate the tv with the following @select statement:

    @SELECT pagetitle,id FROM modx_site_content WHERE deleted != 1 AND parent = 12 or parent = 13 ORDER BY `pagetitle` DESC


    The problem with this is that if I add a new "category" Dinner and have recipes added under that document, I would have to go in and manually update the @select statement in the tv to include that parent document id. I would prefere to have it more dynamic so it can update the list on the fly.

    Is there an easier way of doing this? I would like to list all recipes in the dropdown list (categories don’t necessarily need to be listed.)

    Thanks
    Brian
      • 20288
      • 132 Posts
        • 3232
        • 380 Posts
        Wayfinder is great for the front end, displaying navigations but I am trying to have a TV list all children’s children.

        I don’t think snippets can be used in TVs can they?
          • 3232
          • 380 Posts
          I ended up using the ddtree snippet using the @eval statement which is working great.

          I see that I can also use wayfinder for this but ddtree seems to be "lighter" on the code.
            • 3707
            • 241 Posts
            I’m not sure but the Quill snippet might help you!