We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10176
    • 6 Posts
    Is there a way to change the managers default behavior when clicking a document in the tree. I want the manager to show "Resource Overview" instead of "Edit Resource" when a document is single-clicked.

    Thanks
      • 10176
      • 6 Posts
      I checked an install of 1.0.0 (i am running 1.0.2) and in 1.0.0 the default behavior when clicking a left clicking a resource is the "Resource Overview" panel.

      Anyone know of a way to change this behavior?
        • 11055 ☆ A M B ☆
        • 3,112 Posts
        that’s the default action now.
        (yes, i know, i don’t like that either. :p )
          Rico
          Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
          MODx is great, but knowing how to use it well makes it perfect!

          www.virtudraft.com

          Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

          Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

          Maintainter/contributor of Babel

          Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
          • 4310
          • 2,310 Posts
          In manager/frames/tree.php at around line 331/2 in MODx 0.9.6.3 & 1.0.0 change:
           if(ca=="open" || ca=="") {
                      if(id==0) {
                          // do nothing?
                          parent.main.location.href="index.php?a=2";
                      } else {
                          //
                          //Jeoren added the parentarray, Modified by Raymond: added getFolderState()
                          //
                          parent.main.location.href="index.php?a=3&id=" + id + getFolderState(); //just added the getvar &opened=
                          //
                          // Jeroen added the parentarray
                          //
                      }
          

          To :
           if(ca=="open" || ca=="") {
                      if(id==0) {
                          // do nothing?
                          parent.main.location.href="index.php?a=2";
                      } else {
                          //
                          //Jeoren added the parentarray, Modified by Raymond: added getFolderState()
                          //
                          parent.main.location.href="index.php?a=27&id=" + id + getFolderState(); //just added the getvar &opened=
                          //
                          // Jeroen added the parentarray
                          //
                      }
          

          3 (view) becomes 27(edit)
            • 10176
            • 6 Posts
            Thanks. I found that this was just commented out:

            Line 314:
              parent.main.location.href="index.php?a=3&id=" + id + getFolderState(); //just added the getvar &opened=
            //parent.main.location.href="index.php?a=27&id=" + id; // edit as default action


            So 3 is view and 27 is edit. What other options do we have here?
              • 10176
              • 6 Posts
              ...and getFolderState() do?
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                You can see all the possible "actions" in the manger/index.php file; there is a huge switch there will all the actions and what files they include.

                GetFolderState() just returns an array of opened folders, so the state of the Tree is maintained over page refreshes.
                  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