We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46886
    • 1,154 Posts
    Quote from: chrisandy at Aug 12, 2018, 08:35 AM


    Does it matter what number the resource IDs start at?

    Resource ids start at one and go up, never repeating

    Usually we end up using a tool to re-write the url into the alias, so the alias is a bit more important

    Bob: What's preferred if there will be too many tvs?

    LK: I am a bit unsure of the relationship between MIGXTV and the issue that Bob mentioned. Does MIGX help or not help with this issue? Does it help a bit or a lot?
      • 17301
      • 932 Posts
      Quote from: nuan88 at Aug 12, 2018, 01:40 PM

      LK: I am a bit unsure of the relationship between MIGXTV and the issue that Bob mentioned. Does MIGX help or not help with this issue? Does it help a bit or a lot?

      There is no relationship - It doesn't help. TVs are never really a good idea to search and filter resources by. A repeating MIGXTV with a heading for the attribute and an input box for the attribute value is probably just an easier way to go (as you suggested in your post) when it comes to importing with importx.

      The preferred way would be to extend the resource object or create custom db tables and write your own import script to map the data.
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 46886
        • 1,154 Posts
        it sounds like it could be done by templating, but then that's also troublesome

        maybe one tv to determine the appropriate attributes for a given session makes the most sense here, or even possibly broken up into groups
          • 36582
          • 463 Posts
          Some interesting ideas - especially the 'one tv' approach. I think in my particular circumstances, where the most products on one page is around 20, TVs shouldn't be a problem. I'm going to do a sample of the largest category first, bite the bullet and see what happens.
            Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
            • 3749
            • 24,544 Posts
              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
              • 36582
              • 463 Posts
              That's interesting BobRay - thank you. It also brings up more questions!

              Using ClassExtender, is it possible to bind sets of resource fields to templates to create what Magento calls, an 'attribute set'? (so I'm not binding all 75 fields to every resource)

              Will the extra resource fields be available to Importx?
                Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                • 3749
                • 24,544 Posts
                I don't know how Magento uses attribute sets, but I think you could add add an extra field called attribute_set and fill it in directly on the Create/Edit Resource panel. You could also omit it, put the value in a TV, and populate the field with a plugin when the resource is saved.

                It would take some custom code to search for and display the records with a particular attribute set value.

                [update] On second thought, the getExtResources snippet might do that for you.
                  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
                  • 36582
                  • 463 Posts
                  Thank you Bob - I'll do some experimenting and report back.
                    Web site design in Nottingham UK by Chris Fickling http://www.chrisficklingdesign.co.uk
                    • 46886
                    • 1,154 Posts
                    I've been thinking about this one and just want to throw out some stuff. The crazy thing about Modx is how many ways you can approach a problem, which actually is a hindrance during acquisition, even though its a big part of the longterm appeal.

                    In my mind this binding of the data to the template ^could just be a custom snippet in the template head. TBH I don't know what 'bind' truly means, how low-level that connection must be made, but it seems to control the template rather than be in some sense subordinate to the template. A solid bit of php should be fine to get the job done, whatever values or restrictions can be imposed.

                    Now when you have what seems to be dozens of them, you have to approach it in a more orderly fashion of course. And that would seem to involve digging into the underlying structure of those multiple...sets of data. Can or should they be broken apart into separate factors?

                    MIGX may be attractive, but there are many tools, just thought I would overshare a bit