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

    I try to protect my templates form wrong modifications by clicking the checkbox: "Lock template for editing" on my template editor. But I noticed, this button actually don’t protect at all. The template can be modified even when the checkbox is selected.

    Does anybody knows how to really protect a template for editing?

    Thank you in advance.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That will only prevent anyone who is not an Administrator (role 1 in Evo) from editing the template. Administrator users will still be able to edit it.

      Which version of MODx are you using?
        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
        • 12508
        • 63 Posts
        Hi Susan

        I use: MODx Revolution 2.0.4-pl2.
        It could be great to have a template lock even for the superuser in order to prevent mistakes.

        Thank you for your answer.
          • 36723
          • 94 Posts
          Is it possible to lock templates while an "admin" or sudo user is editing it, similar to a resource ? [ed. note: digitalbart2 last edited this post 14 years, 1 month ago.]
            • 22303 MODX Staff
            • 10,725 Posts
            No, the lock in this case is to prevent non-Administrator users from editing specific Templates (same behavior on other Elements, e.g. TV's, Chunks, Snippets, Plugins, etc.). This is not the same as the locks applied to Resources while a user is editing it.
              • 36723
              • 94 Posts
              Is it difficult to make a plugin or something that could lock templates while they are opened by an admin user?
                • 22303 MODX Staff
                • 10,725 Posts
                Quote from: digitalbart2 at Aug 23, 2012, 09:36 AM
                Is it difficult to make a plugin or something that could lock templates while they are opened by an admin user?
                It's certainly possible to write a plugin to lock it however you would like, though I have not tried doing so.
                  • 36723
                  • 94 Posts
                  Thanks I will take a look into this.