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

    I'll try to briefly explain my question:
    I have two templates: Author (that contain few TVs, one of them is:"authorName") & Book (that contain few TVs, one of them is: "bookAuthor")
    My goal is to make two resources type that will be displayed in each of those templates.
    What I want to do is to load authorName in the Book template as a listbox.

    Is there anyway to do it in Input Option Values, something like "@SELECT [[*TV]] from...."?
      • 18373 ☆ A M B ☆
      • 3,141 Posts
      If you could store the author name in the pagetitle instead of a TV (if your page is all about the author, you may already have that?), you would make it a lot easier for yourself to get the data using a @SELECT binding in the input options, as you could then follow along the examples in the docs where you select the pagetitle and id for the listbox.

      TV values are stored outside the resource table so would require joins and other sql shenanigans.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
        • 49349
        • 5 Posts
        I know.. but I have lot more variables to put so I still have to create some others.. I tried joining tables, it works but it looks "ugly", I think there is a "cleaner" way to integrate it..
        Is there anything like getResources that can do it?

        (Plus, I still need that unknown command in case I need to display a specefic ressource's TV on a different template, the only thing I learnt so far is how to get the full page through "getResources", not a specefic "field"
        )
        Quote from: markh at Nov 17, 2014, 06:42 AM
        If you could store the author name in the pagetitle instead of a TV (if your page is all about the author, you may already have that?), you would make it a lot easier for yourself to get the data using a @SELECT binding in the input options, as you could then follow along the examples in the docs where you select the pagetitle and id for the listbox.

        TV values are stored outside the resource table so would require joins and other sql shenanigans.