We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33982 ☆ A M B ☆
    • 476 Posts
    I’ve seen a snippet like this before, but it was forever ago and now I can’t seem to hunt it down. Essentially I need the ability to be able to list all the Resources (a.k.a. documents) from a specified container and output them either in a drop down T.V. or as Radio buttons for the Manager to pick on any given document.

    So here’s an example:

    Container A
    -- Child 1
    -- Child 2
    -- Child 3
    -- Child 4
    -- Child 5

    When the Manager goes to a Resource and scrolls down to the T.V. section, they’ll have a T.V. which shows Child 1, Child 2, Child 3, Child 4, Child 5 as Radio options. Whenever the manager adds a new Resource to Container A, the new Child, (i.e. Child 6) will show up in the T.V. section. Hope that makes sense.
      Precision Web Development ... SmashStack.com
      • 29635
      • 361 Posts
      You’re looking for the @SELECT binding. Super hotness, that is.
      http://wiki.modxcms.com/index.php/@SELECT_Binding
        Need MODx Ecommerce? Try FoxyCart!
        • 33982 ☆ A M B ☆
        • 476 Posts
        Ahhh...I figured it was something simple like that laugh

        I look around at the WIKI and it eventually took me to this page where this specific example is explained:

        http://wiki.modxcms.com/index.php/Template_Variable_Drop_Down_Menu

        I used the following in the Input Option Values for the T.V. I just setup:
        @SELECT pagetitle FROM modx_site_content WHERE parent='2'


        The "modx_site_content" being the table name in the db and the parent was obviously 2 in the document tree.


        Thanks!
          Precision Web Development ... SmashStack.com