We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 54205
    • 1 Posts
    I would like to collapse the left panel with Resources/Elements tree in Manager.

    I build a custom manager page which needs a lot of space for displaying datagrids, and it would be nice to collapse the panel when opening this CMP, instead of telling user to click on the collapse button to extend the viewport.

    I have tried to inspect the code and find the JS function that is triggered onClick, but since the code is obfuscated/minified, there is no easy way to call it - hacking the JS call would be only temporary solution, since it might break in future when MODX changes/recompiles JS files and the obfuscated JS functions change their name.

    Is there some API for that, or any official way how to hide the panel? E.g. ExtJS call etc. Of course, I can disable the panel using Access Permissions/Policies completely, but that is not a solution smiley
      • 17301
      • 932 Posts
      Not sure off hand, but you should be able to find it by using a mouse event listener on chrome inspector and just stepping in until you get to it.
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 42562
        • 1,145 Posts
        if (!document.getElementById("modx-leftbar").style.display){//if sidebar is open
          document.querySelector("#modx-leftbar-tabs-xsplit div").click(); //click the click thingie to shut it
        }


        Open your Chrome command line and toss that in there to test!
          TinymceWrapper: Complete back/frontend content solution.
          Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
          5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.