We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 44740
    • 4 Posts
    I created a rule for editor User Groupe which hides the Template Tab in the home page (id = 1) this worked great!
    Now however i want to hide all the TV's except one.. so i unchecked the "Visible Checkbox" of the other two Template Variables.

    This seemed to work at first.. but then i checked my other documents like About me (id = 2) and there the other two Template Variables where also hidden!?

    Can anybody tell me how to hide a Template Variables in one document only and not in all of them?

    Really appriciate your help



    Greatings from switzerland
      • 44234
      • 219 Posts
      For your 'resource/create' and 'resource/update' sets, change the constraint field to 'id' and add the id number of the resource you want to target as the 'constraint'.
        Find me on Twitter, GitHub or Google+
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        If this works for you, please let us know. I can't get it to work.
          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
          • 44234
          • 219 Posts
          On closer inspection I can only get this to work for the standard fields, not TV's. Do you think this is a bug or it was never intended for TV's?
            Find me on Twitter, GitHub or Google+
            • 44234
            • 219 Posts
            Think it must be a bug. I can move a TV to a custom tab and it works fine. However hiding a TV seems to ignore the constraint settings.

            https://forums.modx.com/thread/86072/form-costomization-constraints-for-specific-template-variables

            http://tracker.modx.com/issues/9012 [ed. note: davidpede last edited this post 13 years, 2 months ago.]
              Find me on Twitter, GitHub or Google+
              • 44740
              • 4 Posts
              Ahh so it is a bug afterall.. well i hope they fix this soon.

              But for the time being i will you use my workaround, that i created.. figured this one out during lunch laugh

              I just hide all the modx-panel-resource-tv from the parent "web" and with a second set of rules i move the desired tv's to the modx-resource-settings while also hiding the
              modx-panel-resource-tv. At the second rule set a document id is required as a constraint so modx knows for which document you would like these changes.

              This way all the TV's that i dont' want the editor to see in that document are hidden away and the others he can see laugh

              Well thanks a lot guys for your responses

              And i hope that you find some use in my workaround^^



              Greatings from switzerland