We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 47795
    • 16 Posts
    Hello again

    After getting over the last issue, I have been able to set up my MIGXdb as I like. My intention is to use it as a way to input text data with ease, which is then made visible on my website.

    I am currently experimenting with listing audio tracks. I have three fields (all text), Performer, Title and Notes. These are kept in the MySQL table audiotracks. An example of my MIGXdb Template Variable is below:



    I'm very new to PHP and MySQL, so go easy. I was wondering what the best method would be to query the items in the table, and output the information in a clear fashion. Of course each resource will have a different selection of tracks, and so the query will need to have a rule that pulls information for that resource id.

    After a bit of looking around it looks like the general consensus here is to use xPDO for this sort of thing. If that is the case can someone put me in the direction of an easy to follow guide.

    I understand what I am doing is a little different, as most people use MIGX for images (something that I already do), but I really like the way MIGX makes the data entry so easy and would like to use it for this purpose.

    Thanks
    Dan
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      I would be inclined to use the provided MIGx snippets as much as possible. Most of them have some interesting properties to specify various filters and search-like functionality.

      Learning to get the best out of xPDO is very rewarding, but definitely a steep learning curve if you don't already have at least some foundation in PHP and SQL to start with.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 4172
        • 5,888 Posts
        you can use migxLoopCollection to build your table at frontend.

        [[!migxLoopCollection?
        &packageName=`yourPackage`
        &classname=`yourXpdoClass`
        &tpl=`yourTplChunk`
        &where=`{"resource_id":"[[*id]]"}`
        ]]


        see also here:
        http://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials/migxdb.create-a-basic-gallery-management-from-scratch-with-migxdb#MIGXdb.Createabasicgallery-managementfromscratchwithMIGXdb-ListingtheImagesonFrontend.

          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!