We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3349
    • 126 Posts
    Hi all

    Can someone tell me how I can do this please?

    As title suggests, I have a TV and I want to populate it with the pagetitle of documents in a parent folder. Once user selects the required pagetitle, I’d like to use the id of that document in my template

    Can someone let me know how this can be done? I have a feeling I nned to use the @select but cant find anything about it

    Thanks

    bS
      • 26016
      • 561 Posts
      I don’t have a quick answer, although some kind of DB call would work, I’m sure. Can you elaborate on what you will do with these doc names when you get them?

      I can think of a Ditto scenario that might work, depending on what the name is being used for.
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 3349
        • 126 Posts
        SOLVED!

        I had seen a previous thread with the following call in it...

        @SELECT pagetitle,id FROM modx_site_content WHERE parent = some_id

        I realised my databse tables never had the modx_ prefix so I changed it to:

        @SELECT pagetitle,id FROM site_content WHERE parent = some_id

        Ding Ding!