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

    I’m fairly confident the answer to this will be no, but can Ditto list content from a custom Database? How hard would it be to modify it to do this?

    Ditto obviously has some advanced, robust and flexible listing features, however Modx does not deal with very high page counts particularly well (although i believe this is being addressed), it simply strikes me as very wasteful to spend time coding something similar to Ditto just so that it can deal with content not contained in the standard Modx "page" style DB. Similarly, where pages are effectively the same but with slightly different content items, it makes no sense to have these as seperate pages (when they can run into tens (hopefully more!) of thousands) but rather adopt a dynamic page structure that can pull content from a DB.

    Any suggestions on this appreciated.

    Cheers,

    DM
      • 18397
      • 3,250 Posts
      Some thoughts:

      1. If pages are essentially the same, say for sports player bios, just create a collection of TVs for the fields that are different and then you can use Ditto to display all of them on one page or one at a time.


      2. Ditto is not currently able to pull content from a custom database but if you are experienced with PHP, modifying the forthcoming version should not be too difficult.
        • 6437
        • 157 Posts
        Hi Mark,

        Thanks for the reply, unfortunately I’m not an experienced coder or web designer (I dabble) - but being a web enthusiast I have tons of ideas - hence my first website project is proving a little advanced for me however im determined to persevere smiley

        Even though it may be possible I would rather not modify Ditto, I’m a firm believer in not hacking things together but just using a flexible architecture - hence i love the idea of ModX.

        Having surfed these forums for sometime I’m familiar with TVs, although using them as you describe with Ditto has not occured to me. Am I correct in thinking that you are suggesting that Ditto is capable of effectively itterating through different values for TVs i.e. listing the same "page" several times taking into consideration te different TV values?

        If so, this sounds fantastic and is exactly what I was hoping for! Any chance you could point me in the right direction for achieving this? And, if its not pushing my luck, a few tips on how TVs could be populated from a DB?

        Thanks for the reply, its renewed my enthusiasm for a project that is way overdue for completion! grin

        Cheers

        Steve
          • 11975
          • 2,542 Posts
          Hi,

          about your last question:
          You can populate tv values from a table using @BINDINGS.
          In your case the @SELECT
          ex: @SELECT name,id from ma_table (put this code in the option values field)

          :-)
            Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
            • 6437
            • 157 Posts
            Thanks Heliotrope.

            Its a good few months since I’ve had chance to play with ModX - should have known that without bothering you guys, just got a bit carried away. The more I think about it the more I think i must be miss interpretting what Mark said. Any feedback from more experienced Ditto users would is always appreciated smiley

            Cheers

            Steve