We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10525
    • 247 Posts
    I just upgraded from 2.3.5 to 2.4.3 and very happy to see the return of my site name and modx version into the manager header. At last!

    Now (don't hit me!) I want to hide the MODx version for some users. I can do this by adding the following to the foot of the manager > templates > default > css > index.css file to hide the version and reposition the site name (the css looks compressed, so I'm not sure if this is sensible..):
    #modx-site-info .site_name {
        line-height:30px;
    }
    #modx-site-info .full_appname {
        display:none;
    }

    I create a new folder for a custom template/theme, as described in https://rtfm.modx.com/revolution/2.x/administering-your-site/customizing-the-manager/manager-templates-and-themes, then add a new manager_theme setting to the user to use this theme. The css change works, but the modx logo and search button disappear.

    Is there another way I can make this tiny style change for a user?

    I also came across this post: https://modx.com/blog/2014/07/11/manager-theme-introduction/. Is this now out of date? I couldn't see a sass dir in my manager files.

    This question has been answered by scoder. See the first response.

      • 3749
      • 24,544 Posts
      You could put that code in a separate file and create a Yes/No user setting with a key of hide_version (you might need !important).

      Then, in a plugin attached to OnManagerPageBeforeRender, put this code:

      $hideVersion = $modx->getOption('hide_version', null, false);
      if ($hideVersion) {
          $modx->regClientCSS('path/to/css/file');
      }
      return '';
      


      That should inject your CSS below the regular CSS so it will override the default behavior. I'm not sure it will work, but it's worth a try.


        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
        • 40090
        • 8 Posts
        Quote from: BobRay at Feb 17, 2016, 05:09 PM
        You could put that code in a separate file and create a Yes/No user setting with a key of hide_version (you might need !important).

        Then, in a plugin attached to OnManagerPageBeforeRender, put this code:

        $hideVersion = $modx->getOption('hide_version', null, false);
        if ($hideVersion) {
            $modx->regClientCSS('path/to/css/file');
        }
        return '';
        


        That should inject your CSS below the regular CSS so it will override the default behavior. I'm not sure it will work, but it's worth a try.



        This did the trick for a problem is was having! I wanted to disable the right-click on the resource tree for a user-group.
        Created a css file:
        ul.x-menu-list{
            display: none !important;
        }
        


        Used you example. Worked like a charm!
        Thanx smiley
          • 3749
          • 24,544 Posts
          Glad I could help. 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
          • discuss.answer
            • 51216
            • 35 Posts
            Hi Bob

            Could you please help me out here. I created the plugin and file as described but I'm not sure what you mean with "create a Yes/No user setting with a key of hide_version"?

            I tried going to User Settings > Create New and added Key 'hide_version' with the name 'Hide Version' and value 'Yes'.

            This didn't seem to work. Am I missing something?

            Edit: Never mind I just changed the plugin to this

            <?php
            if ($modx->user->isMember('Administrator')) {
                return;
            }
            $modx->regClientCSS('/manager/templates/custom/css/user.css');
            [ed. note: scoder last edited this post 6 years, 7 months ago.]