We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8427
    • 14 Posts
    I don’t know MODx very well.

    I’d like to use a TV to show a drop down list of all pages/resources that are children of a specific resource.

    I read the documentation and it seems very easy:
    http://rtfm.modx.com/display/revolution20/Template+Variable+Input+Types#TemplateVariableInputTypes-ResourceList

    But exactly where must I put the parent’s resource ID ?

    I really don’t understand... huh

    Thank you.
      • 26016
      • 561 Posts
      Hi,
      This sounds like a nifty thing, but indeed, is documented in programmer-speak. smiley
      I feel your pain, I can’t get it to work either. And that’s after using MODx for years. I tried sticking a number of a document in Default Value of the TV. That just got it to display the child of some other document, and displayed the same one no matter which document I looked at.

      Then I tried "@RESOURCE [document number]" as the default value, same thing there. So I’m stuck, too. One question would be, what is "definition", I suppose.

      Cheers, Dave
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 20413
        • 2,877 Posts
          @hawproductions | http://mrhaw.com/

          Infograph: MODX Advanced Install in 7 steps:
          http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

          Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
          http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
          • 8427
          • 14 Posts
          Yes. If I insert this code:

          @SELECT `pagetitle`,`id` FROM `[[+PREFIX]]site_content` WHERE `parent` = 6 AND `published`= 1


          as Input Option Value (changing the parent’s id in according to my needs), it works as I expected.
          (but I had to change the Input Type to Drop Down List Menu)

          The point is that the documentation says:
          Supply the definition with a resource ID, and you’ll end up with a drop down list of all pages/resources that are children of that resource.

          So this leads me to think that there must be a field where I can simply write the id I want. Isn’t it?

          Thank you.
            • 11076
            • 159 Posts
            I think that’s the same. resource list input type is just a shortcut.
            Input Type:             resourcelist
            Input Option Values:    6
            Default Value:
            Output Type:            default
            

            And you’ll end-up with a DropDownMenu input TV type listing all the children of parent number 6, Same result as using the @Select binding.

            The question is what you’re trying to achieve?
              Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
              • 8427
              • 14 Posts
              Quote from: gOmp at Jan 23, 2011, 03:01 AM

              I think that’s the same. resource list input type is just a shortcut.
              Input Type:             resourcelist
              Input Option Values:    6
              Default Value:
              Output Type:            default
              

              And you’ll end-up with a DropDownMenu input TV type listing all the children of parent number 6, Same result as using the @Select binding.

              The question is what you’re trying to achieve?
              I’d like to have a drop down list of resources that are children of the given resource.

              Simply I didn’t know where to put the parent resource ID. Now I know. Thank you very much! grin
                • 10189
                • 109 Posts
                The million dollar question: how to get children indented in that list. wink I believe Quill for MODx Evo did this, so I’m thinking a custom snippet is probably needed. Too bad Input Type: Resource List doesn’t do this. smiley
                  • 17723
                  • 221 Posts
                  @ ecmedia Did You found a solution for listing children from current resource with TV resource list?
                    Lucas from AroundCyprus.net