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

    I just came across the idea to try something completly new and therefore thinking about to get involved in MODx. I'm usually using Contao as my preferred CMS system, however, I'm not always aligned with the idea of the community and the software.

    Now, there's a plugin existing for Contao, called Metamodels. This plugin enables your system to create tables in your database, enter/modify data and display the data via frontend module. Additionally you can create filters, which gives the visitor the ability to look for specific content in the data.

    Since I'm really in the starting position without having digged to much into MODx, I'm asking myself if there's something similar existing for this CMS. Would be great if someone could answer this question to me.

    Many thanks in advance, regards, Thomas
      • 4172
      • 5,888 Posts
      I don't know, what Metamodels does.

      There is MIGXdb, which is included with the MIGX-package.
      It helps to create the needed xPDO-package(s) for custom-tables, helps to create Custom-Manager-Pages for CRUD and has some snippets(mainly migxLoopCollection) for frontend-listings and detail-views.
      migxLoopCollection can also be used for filtered listings.

      some Tutorials to get started:
      https://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials
      https://www.youtube.com/watch?v=jwzx6O7zdaU

      about xPDO:
      https://rtfm.modx.com/xpdo/2.x/getting-started
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 3749
        • 24,544 Posts
        The ClassExtender package creates tables for extending the modResource and modUser objects. In theory, it could be used to create other custom tables, but it might take some extra work on your part.

        It's also possible that Metamodel could be modified to work in MODX. Without seeing the code, it's difficult to say how much trouble that would be.
          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
          • 51584
          • 5 Posts
          Hi,

          Metamodels is quite powerful and clever. Let me describe how it actually works.

          You create a Metamodel, which is more or less a simple database table in the same database as the CMS resists. In the next step you create the attributes, which are the database fields. You can create several different types, some of them are predefined, like "Yes/no", but you can also reuse values from other Metamodels as values, like a select menu. After all fields are created you're using rendering masks, one for the backend, one for the frontend. Those rendering masks define the fields displayed. You can apply filters to those rendering masks, which control the data displayed, i.e. one mask for a list display, and a second mask for all details of an entry. As next step you have to create an entry mask, which is more or less the mask where you enter all data in the backend. Currently no data entry from the frontend is supported. As last step you define filters which can be either used in the frontend to enable the user some search options, or to apply filters for the rendering masks, i.e. jsut display all entries with a date from today onwards (tournamend_date >= sysdate).

          Most magic happens in the backend, the frontend has no intelligence except the filter options to breakdown your list or catalog. A working example is a site, which I own. It displays tournament events for a local sport here in Austria. The link to this site is http://www.stocksportevents.info (sorry, just German). You see Metamodels in action at the front page (in the middle, ten rows displayed) and under "Termine".

          Regards, Thomas
            • 4172
            • 5,888 Posts
            This is absolutly possible to build with MIGXdb
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Definitely sounds like a job MIGXdb.
                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