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

    I have a bunch of values in MIGX and would like to set default values against them, is that possible?

    {"field":"recipeServes","caption":"Recipe Serving Number"},
    {"field":"preperationTime","caption":"Preparation Time"},
    {"field":"cookTime","caption":"Cook Time"}


    Thank you:)
      ■ 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.
      • 28432
      • 372 Posts
      Hi, i'm not sure that is really clear. Can you explain a bit more?
        • 17301
        • 932 Posts
        Hi Steeve,

        Thanks for your reply. Ok so instead of creating numerous separate TVs for 'recipeServes', 'preperationTime' and 'cookTime' and a bunch of others I've used MIGX to aggregate the TVs are just one TV, as that's what its for.

        However, when you setup a TV in the normal fashion you can put a default value against it incase it's not populated, right? That's what I'd like to do against my TVs that are in MIGX.

        Unfortunately I can't see anything about doing it in the documentation so I assume it's not possible?
          ■ 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.
          • 4172
          • 5,888 Posts
          doesn't this work?

          {"field":"recipeServes","caption":"Recipe Serving Number","default":"default value"}
          
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 28432
            • 372 Posts
            I'm not sure but i think you could do this with MIGX Management (config) and maybe not with classic MIGX TV. You should go to the main menu Extra > MIGX > MIGX TAB then you can a new element. Like i said i don't know if you could add default properties inside a "classic" MIGX TV.

            I hope this help.
              • 17301
              • 932 Posts
              Quote from: Bruno17 at Mar 02, 2017, 09:16 AM
              doesn't this work?

              {"field":"recipeServes","caption":"Recipe Serving Number","default":"default value"}
              

              Thanks Bruno - I did try that before posting here but sadly it doesn't work sad



              Quote from: Steeve at Mar 02, 2017, 09:35 AM
              I'm not sure but i think you could do this with MIGX Management (config) and maybe not with classic MIGX TV. You should go to the main menu Extra > MIGX > MIGX TAB then you can a new element. Like i said i don't know if you could add default properties inside a "classic" MIGX TV.

              I hope this help.

              Thanks for your reply - unfortunately I have 6000 recipe resources so retrofitting a new method wouldn't be possibly really :|
                ■ 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.
                • 17301
                • 932 Posts
                Ahhh ok I see the problem now.

                "default":"value" 


                Does work. However, it only works for every NEW item and it doesn't seem to retrofit the default value. I've tried clearning cache, calling uncached and everything else I can think of but having no luck. Retrofitting 6000 recipes isn't ideal - any suggestions at all from anyone?

                Many thanks.
                  ■ 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.
                  • 4172
                  • 5,888 Posts
                  this is only working to set a default-value, when creating a new item.
                  If you need a default-value at output-time, use an output-filter or a snippet at your placeholders
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!