We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6491
    • 70 Posts
    I would like to remove the [*content*] from the template for the home page and only let the client edit the TVs I created. But I don’t see [*content*] in my list of TVs. Is there a way to remove it?

    Thanks.
      • 26016
      • 561 Posts
      I’m not sure of that - possibly the ManagerManager snippet will do that.

      But another answer is to simply take it out of the template you’re using. I frequently do this, especially with Home pages, and have a bunch of TV’s to fill in various spots. That way, if they fill in content, it won’t appear anyway.

      Cheers
        MODx and Wordpress development
        Linux, PHP 5.2, MySQL 5.0, Evo 1.05, Revo 2.08-pl, Firefox 4
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Please keep in mind that the basic resource variables, such as [*pagetitle*] and [*content*] are NOT tvs. They are taken directly from the values in the site_content table, and are handled quite differently from tvs. They just use the same tags.
          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
          • 6491
          • 70 Posts
          Thanks Susan,

          So I should just remove [*content*] from the template so it doesn’t show on the page and put directions in there so people don’t try to edit it. Right?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            You can hide the field with ManagerManager
            mm_hideFields($fields, $roles, $templates)

            Hides one or more of the default fields within the manager.

            If a field to be hidden is a template variable, it must be prefixed by ’tv’.

            $fields: The name(s) of the fields this should apply to (from table above). Can accept multiple fields separated by commas [Required]

            $roles: comma separated list of role IDs this should be applied to. Leave empty (or omit) for all roles [Optional - default is all]

            $templates: comma separated list of template IDs this should be applied to. Leave empty (or omit) for all templates [Optional - default is all]

            mm_hideFields(’link_attributes’); // Hide the link_attributes field for all users

            mm_hideFields(’alias’, ’1’, ’3’); // Hide the alias field for users with role "1" editing documents using template ID "3"

            mm_hideFields(’tvmyVar’, ’2’); // Hide the template variable "myVar" for users with role "2"
              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
              • 11076
              • 159 Posts
              Is it possible to do that in Revolution as well (with FC)?
                Michael Shraibman( gOmp)  | Freelance Design & Development | wink  impossible is nothing...
                • 3749
                • 24,544 Posts
                Quote from: gOmp at Dec 30, 2010, 01:36 PM

                Is it possible to do that in Revolution as well (with FC)?

                Yes. smiley
                  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
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Revo has a huge advantage in this, since all manager pages are customizable. For Evo, ManagerManager only applies to the resource editing form.

                  That is because all of Evo’s "action" scripts are HTML with inline PHP echoing everything as it’s generated; there’s no way to modify the output (unlike how the parser works making pages; the output is collected into the documentOutput variable, so plugins can easily manipulate it at various points during the parsing process). ManagerManager does it with complex Javascript functions to manipulate the DOM in the browser.
                    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