We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12322
    • 13 Posts
    I want to use loopDbChunk, I have never used it before and it seems great. I created a custom table in the Modx database call user_reviews I am not using the modx_ prefix, it is simply user_reviews. Where do I put this information in the snippet call. I can't find much on help on this add on.

    This is a standard call I found and did get this to work.

    [[!loopDbChunk?
    &class=`modResource`
    &alias=`doc`
    &select=`pagetitle`
    &where=`{"published:=":1,"hidemenu:=":0}`
    &orderby=`parent ASC,id DESC`
    &tpl=`@INLINE <li>[[+pagetitle]]</li>`
    &outerTpl=`@INLINE <ul>[[+output]]</ul>`
    &limit=`5`&debug=`1`]]

    Please help!
      • 4172
      • 5,888 Posts
      Not sure, if loopDbChunk is still supported.

      If you haven't build xpdo-stuff for your table, you can try rowboat.

      If you want to use xpdo, then you can try migxLoopCollection (in the MIGX - package)
      or pdoResources (in the pdoTools - package)

      And, IMO, its a good idea to have the modx_ - prefix on your table.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 3749
        • 24,544 Posts
        @Bruno17, the official word (from OpenGeek) is that custom tables should have a different prefix.

        I don't know all the reasons, but I'm inclined to take his word for it. wink
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 4172
          • 5,888 Posts
          I used to have a custom suffix to the default - MODX - prefix, like:

          modx_mypackage_table1
          modx_mypackage_table2
          modx_mypackage_table3
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 12322
            • 13 Posts
            Bob & Bruno Thanks for the response.

            I did know that loopDbChunk 1 is not supported but this is loopDbChunk 2.xx

            @bob I did follow you show quotes tutorial and have gotten it working as far as showing result. Know that it is a model I was hoping to use the loopDbChunk. Any further thoughts?

              • 3749
              • 24,544 Posts
              You'll need the &package, &model, and &class properties in the snippet tag. The loopDbChunk docs are pretty terrible, and bear in mind that it's an alpha release (not even a beta).

              I'd be inclined to write my own snippet to display the results. There's an example in my book.


                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting