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