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

    I am using MIGX to allow my content editors to edit some custom tables that I have created. One of my custom tables is a bridge table (many to many relationship) with 3 columns. Essentially I have activities that can go in multiple categories and multiple sub categories. For example if my activity was hiking, it could go in the category recreation, and family activities, and the sub categories active, nature & outdoors, and wildlife.

    I am wondering if it is possible to make it so that when a user checks multiple check boxes when adding/editing a row it inserts a new row for each check box into my bridge table instead of storing a string. This way my content editors do not have to manually create an entry for every single possible case.

    Also how do I use MIGX to display a bridge table when it does not have any id column?

    Thank you for your help!
      • 4172
      • 5,888 Posts
      I wouldn't use multiple-checkboxes to select the categories/subcategories, but a grid, which shows the subcategories. There can be a filter for parent-categories and a filter for connected subcategories.
      The grid can have a clickable column, which starts a processor, when you click on it, to create/remove the connection.

      A good way to build a category-tree, is using the resource-tree and resources.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 39990
        • 45 Posts
        Thank you for the response Bruno17!

        I am not sure what you mean by grid... What is a grid?

          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The table that you see when you first open the resource's Template Variables tab. Basically, a "grid" is just an HTML table. In the case of MIGx, you can have layers of windows, each one with its own grid.
            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