We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30525
    • 9 Posts
    This should be easy to implement, and would save considerable hassle: when changing the value of a template variable defined as an option-list, update all documents that use the variable to the new value.

    I.e. if you have a template variable with choices 1,2,3, displayed as a drop-down, and I change the value for option 3 to 4, MODx should update all documents using the value "3" for the template variable to use "4". Or could this cause trouble?

    TrafficJan82
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you change the default values for a TV, it should update any documents that didn’t define it separately themselves - or at any rate, since the individual page should reflect the default if it isn’t separately defined, it would have that effect.
        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
        • 30525
        • 9 Posts
        The problem isn’t with the default, it’s with other options - which is why there may be issues updating it automatically.

        For example, I’m using a snippet to check a user’s ID against a file for authorisation. When I changed one of the filenames in the template variable list, all pages using that filename displayed the default value in the dropdown, but had the template variable set to the old filename. Ideally, MODx should have checked all pages using the current set of options, and updated the old filename with the new.