We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36760
    • 136 Posts
    I'm on Modx Revolution 2.5.0-pl, running MIGX 2.9.6-pl. I have the following MIGX setup (removed some fields to make everything shorter):

    TV: guideSpellSection
    [
    {"caption":"Spell Section", "fields": [
    {"field":"section-name","caption":"Section Name"},
    {"field":"spell-box-list","caption":"Spell Boxes","inputTV":"guideSpellBox"}
    ]}
    ]

    [
    {"header": "Section Name", "width": "160", "sortable": "true", "dataIndex": "section-name"}
    ]


    TV: guideSpellBox
    [
    {"caption":"Spell Box", "fields": [
    {"field":"spell-name","caption":"Spell Name"},
    {"field":"spell-anchor","caption":"Spell Anchor Name"},
    ]}
    ] 

    [
    {"header": "Spell Icon", "width": "50", "sortable": "false", "dataIndex": "spell-icon","renderer": "this.renderImage"},
    {"header": "Spell Name", "width": "160", "sortable": "true", "dataIndex": "spell-name"}
    ]


    This is working out great as far as everything saving and displaying properly with my template chunks. What I'd like to change is the "guideSpellBox" tabs showing inside the popup for the "guideSpellSection." I'm hoping to make it so they all display right on the Template Variables tab so that each guideSpellBox could be dragged and dropped between sections if needed. Basically, it would look something like this:



    Is this possible, or is it trying to go against how MIGX is setup to work? I'm guessing I could do something clever with the Grid Columns, but I'm not quite sure where to start.

    Thanks for the help!

    This question has been answered by firebot6. See the first response.

    • discuss.answer
      • 36760
      • 136 Posts
      Just for anyone who comes by this later on. I never figured out how to do what I wanted exactly. Instead, I created a MIGXdb following these steps: https://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials/migxdb.create-a-basic-gallery-management-from-scratch-with-migxdb.

      I changed the fields in the XML Schema of course, including adding a "category" field. So now if I want to change categories I just need to update that field for the entries.

      I display each of the categories with a code like this:
      [[!migxLoopCollection? &packageName=`databaseSpells` &classname=`databaseSpells` &sortConfig=`[{"sortby":"name","sortdir":"ASC"}]` &where=`{"published":"1","category":"Main Spell"}` &tpl=`databaseSpellGroupSectionTpl`]]


      The important bit being:
      &where=`{"published":"1","category":"Main Spell"}`
      .

      Hopefully that helps!
        • 4172
        • 5,888 Posts
        thanks for reporting, how you solved it.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!