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

    Migx is essential for every site we do now, but it would be really nice if this functionality was part of the core.

    So here is my proposal, child tv's:



    Features would include:

    - drag/drop to change the sort order
    - basic validation options & a validation hook on the parent tv
    - display options e.g width of text box
    - linked tv's e.g a select menu tv that controls another select menu tv

    The tv grid and form would work much like migx does now.
      Eighth day design
      Design agency with offices in Edinburgh and Brighton
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If we're going to go into such a major renovation of core TV functionality, why not go the rest of the way and make them Extended Resource Fields, and get them off of Templates altogether? What real logical connection do they have to Templates, except to act as a kludgy kind of categorization for Resources? Give Resources their own Categories, tie the ERFs to the categories, and then they would truly be flexible and manageable.
        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
        • 42967
        • 143 Posts
        Tying Tvs to templates make sense to me - each layout requires different backend fields - so this seems very logical?

        How would you set the tv to the resource without using a template?
          Eighth day design
          Design agency with offices in Edinburgh and Brighton
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Have categories for resources, tie TVs (well, not TVs any more, obviously) to the resource's category. Leave Templates out of it, those fields have nothing at all to do with templates and everything to do with the resource. Templates were used simply because they were an existing, handy way of categorizing resources. But now what happens if you want to use the same template, but have different TVs for various groups of resources? You end up with multiple copies of the exact same Template, just to organize the TVs!
            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
            • 42967
            • 143 Posts
            I never seem to end up with that scenario - maybe you could provide an example?

            I guess I am thinking about it from the clients point of view, they pick the template and then get the correct fields to fill out for the template


              Eighth day design
              Design agency with offices in Edinburgh and Brighton
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              They aren't filling out fields for the template, they are filling out fields for the resources. Those fields have nothing at all to do with the template. If you have different groups of resources that need different TVs, some need these TVs and others those, then you either have a cluttered, confusing TV list, or you have a template for each group of resources. And what happens if, for some reason, you want a resource to have no template, but you want TVs for it? Another totally redundant template.
                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
                • 42967
                • 143 Posts
                Maybe I build different, by my clients do fill out the fields to match the templates they have selected...

                I am trying and failing to think how it would work for a client to create a page and choose the layout and be able to populate correctly if the tv's were not tied to a template.
                  Eighth day design
                  Design agency with offices in Edinburgh and Brighton
                  • 4172
                  • 5,888 Posts
                  I think there should be something like formtemplates (something like formtabs in MIGX)
                  A formtemplate defines which fields (TVs) have to be in which order on that form

                  Each Template could have assigned one or more formtemplates.
                  Each Formtemplate could be assigned to one or more Templates.

                  When the user selects a new Template and there are more than one formtemplates for that template,
                  there should be a dropdown from where to choose the correct formtemplate or make it depending on other settings which formtemplate to select in this or that situation.

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

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 40045
                    • 534 Posts
                    Quote from: sottwell at Mar 25, 2013, 07:52 AM
                    Have categories for resources, tie TVs (well, not TVs any more, obviously) to the resource's category. Leave Templates out of it, those fields have nothing at all to do with templates and everything to do with the resource. Templates were used simply because they were an existing, handy way of categorizing resources. But now what happens if you want to use the same template, but have different TVs for various groups of resources? You end up with multiple copies of the exact same Template, just to organize the TVs!

                    I very often have that problem, what I do is manage my templates as static resources via ElementHelper extra and then just duplicate the template (leave the static source the same) and assign it other TVs, but even if this works, it's definitely not an ideal solution...

                    Quote from: sottwell at Mar 25, 2013, 08:29 AM
                    They aren't filling out fields for the template, they are filling out fields for the resources. Those fields have nothing at all to do with the template. If you have different groups of resources that need different TVs, some need these TVs and others those, then you either have a cluttered, confusing TV list, or you have a template for each group of resources. And what happens if, for some reason, you want a resource to have no template, but you want TVs for it? Another totally redundant template.

                    have a ton of them =D...I use them usually with getResources or something like that, so I don't need actual HTML in the template (that goes into the getResources tpl / tplWrapper chunks, but I need custom fields for example for "product" or "teammember" resources...so a template for this purpose works but it's totally "inelegant" of having to do it like that^^, so I would love to see another solution to assign TVs/Forms to resources...

                    Quote from: Bruno17 at Mar 25, 2013, 11:44 AM
                    I think there should be something like formtemplates (something like formtabs in MIGX)
                    A formtemplate defines which fields (TVs) have to be in which order on that form

                    Each Template could have assigned one or more formtemplates.
                    Each Formtemplate could be assigned to one or more Templates.

                    When the user selects a new Template and there are more than one formtemplates for that template,
                    there should be a dropdown from where to choose the correct formtemplate or make it depending on other settings which formtemplate to select in this or that situation.

                    I like that idea of "Formtemplates", it would be great if even the "standard" resource fields could be controlled like that (would maybe reduce form customization needs to a certain degree or replace it even completely...)