Skip to content
General Revolution Evolution Add-ons International
Login | Register | MODX.com
MODX Open Source Content Management System, Framework, Platform and More.
Find a Partner | Hosts + SaaS | Jobs | Donate
  • RegisterSign Up with the MODX Community
  • LoginUse Your MODX.com Account
  • MODX Community Forums
  • Add-ons
  • Creating & Repurposing Content
  •  
  • Template Variable Input Type: Resource List#

  • 8427
    14

    ecmedia Reply #1, 1 year, 4 months ago

    Reply
    • Link to this post#1
    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...
    Thank you.


  • 26016
    561
    MODx and Wordpress development
    Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4

    samba Reply #2, 1 year, 4 months ago

    Reply
    • Link to this post#2
    Hi,
    This sounds like a nifty thing, but indeed, is documented in programmer-speak. 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


  • 20413
    2,474
    My playground: http://4up2date.info | Twitter: @mrhaw

    mrhaw Reply #3, 1 year, 4 months ago

    Reply
    • Link to this post#3
    Related
    http://modxcms.com/forums/index.php/topic,52337.msg326740.html#msg326740
    ( http://modxcms.com/forums/index.php/topic,57045.msg338611.html#msg338611 )

    //EVO: http://modxcms.com/forums/index.php?topic=49281.0


  • 8427
    14

    ecmedia Reply #4, 1 year, 3 months ago

    Reply
    • Link to this post#4
    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
    157
    Michael Shraibman(gOmp)  | Freelance Design & Development|  ;)  impossible is nothing...

    gOmp Reply #5, 1 year, 3 months ago

    Reply
    • Link to this post#5
    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?


  • 8427
    14

    ecmedia Reply #6, 1 year, 3 months ago

    Reply
    • Link to this post#6
    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!


  • 10189
    109

    frippz Reply #7, 1 year, 1 month ago

    Reply
    • Link to this post#7
    The million dollar question: how to get children indented in that list. 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.


  • 17723
    154

    lx Reply #8, 8 months ago

    Reply
    • Link to this post#8
    @ ecmedia Did You found a solution for listing children from current resource with TV resource list?





Actions

Login to Post

Other Support Options

To file a bug or make a feature request visit our issue tracker, or you can also purchase commercial support.

Love MODX?

If you build sites for a living with MODX or just love using it, why not give back?

Information

Posted in this thread:
ecmedia, frippz, gOmp, lx, mrhaw, samba

 
Back to Top

MODX Global HQ

1333 N Stemmons Fwy, Ste 110
Dallas, TX 75207
United States

+1 (469) 777-MODX (6639)

The MODX Company

  • Contact
  • Media Center
  • Careers at MODX
  • Wall of Fame
  • The MODX Blog

Sponsors

SoftLayer Firehost: Secure Cloud Hosting

Stay Connected

Read our previous email newsletters.

Twitter Facebook Google+ LinkedIn github Feeds

Privacy Policy | Terms of Service | Pixels by AKTA Web Studio© 2005-2012 MODX. All rights reserved. Trademark Policy