We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52064
    • 120 Posts
    I need to create 40 different TV for a template.
    I wanted to know if I could use MIGX to group them into a single TV.

    Example:
    Instead of creating many in modx TV: Title, Subtitle, Color1, Color2, Colore4 ... .., size, margin, etc.
    I create a TV migx SETTINGS one that contains all of these settings.

    Attention, it is not a multi record.

    Thank you.

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

      FerX - Developer at Eracom s.r.l.
      • 4172
      • 5,888 Posts
      This is possible.
      Use input-options like that for the MIGX-TV to prefill the grid:

      [{"MIGX_id":"1","name":"title"},{"MIGX_id":"2","name":"subtitle"},{"MIGX_id":"3","name":"color1"}]


      name your fields for example name and value and have both fields in your formtabs!
      the name-field could be of inputTVtype:hidden, so it can't be changed, but it needs to be in the formtabs.

      Then you can output it at the frontend like that:

      [[getImageList? &tvname=`pagesettings` &toSeparatePlaceholders=`pagesetting` &tpl=`@CODE:[[+value]]` &placeholdersKeyField=`name`]]
      
      [[+pagesetting.title]]
      [[+pagesetting.subtitle]]
      [[+pagesetting.color1]]
      

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 52064
        • 120 Posts
        Thanks for the answer, but if I understand it in this way I can not specify a different tvType for each option. Right?

        ps: Migx is a fantastic invention, it would take a bit of documentation :-P
          FerX - Developer at Eracom s.r.l.
        • discuss.answer
          • 4172
          • 5,888 Posts
          you could create multiple value fields in the formtab, each with another intputTVtype

          and show only one of them and hide the others, depending of the name-value, with restrictive condition, for example:

          "restrictive_condition":"[[+name:is=`color`:then=``:else=`1`]]",


          this would show this field, when the value of name is 'color'
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 52064
            • 120 Posts
            MIGX is amazing.
            I could define it essential for modx.

            Where can I find more documentation?

            Thanks for the help Bruno17.
              FerX - Developer at Eracom s.r.l.
              • 4172
              • 5,888 Posts
              Had begun something, but couldn't get that far, yet
              http://bruno17.github.io/MIGX/

              then there are some tutorials at rtfm and some youtube - videos from gelstudios
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!