We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14066
    • 37 Posts
    I’m currently trying to customize Modx for a client. He wants to skip the page data in the manager after he has clicked on a document. In stead of that he wants the manager to go directly to the edit screen, without having to click the edit button first.

    I’ve been looking around in the code already but I can’t find a solution for this. Maybe someone has a clue where I can change that option?
      • 4310
      • 2,310 Posts
      Err... right click the page in the document tree and hit edit huh
        • 7231
        • 4,205 Posts
        Or if on a mac click on the icon rather than the name to open the contextual menu and select ’edit document’.

        You would need to hack the core to bypass the info page....not a good idea since updating would be a drag.
        Edit: No need to hack...can use a plugin, see my post below for an example.
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don't know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 14066
          • 37 Posts
          Quote from: bunk58 at Jul 03, 2009, 05:16 AM

          Err... right click the page in the document tree and hit edit huh

          That’s what I said too, but he says that’s to difficult for him. But now I have the confirmation that it can’t be done like he would like it, so i’ll settle this down with him. thnx
            • 4310
            • 2,310 Posts
            but he says that’s to difficult for him
            LOL is he able to manage life, let alone a website wink
              • 7231
              • 4,205 Posts
              OK...I hate to contradict myself...but this IS possible to do very easily without any hacking.

              However, this method will never allow the info page to show at all (for example when selecting cancel when editing it will return to the edit screen). With some extra logic we can add exceptions if needed but this is just a proof of concept.

              Create a new plugin, name it whatever you want (i named it redirect2edit) and paste this bit of code (remember this is proof of concept code):
              //<?php
              // redirect if action is 3 to action 27 (edit)
              if($_GET['a'] == '3'){
                  $nurl = 'index.php?id='.$_GET['id'].'&a=27';
                  header("Location: $nurl");
                  exit;
              }


              Then in the plugin set the Sytem Event to OnManagerPageInit and save.

              now the info page will never load again grin

              note: the <?php tag is not required that is why it is commented..just added for syntax coloing
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don&#39;t know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 34162
                • 1 Posts
                This is also very useful to me. Works like a charm. laugh

                Thank you for this code
                  • 19
                  • 10 Posts
                  Thanks very much for this plugin, not being able to skip straight to the edit action is something that has been bugging me about MODx for ages!
                    • 3749
                    • 24,544 Posts
                    Quote from: jevdo at Jul 03, 2009, 05:14 AM

                    I’m currently trying to customize Modx for a client. He wants to skip the page data in the manager after he has clicked on a document. In stead of that he wants the manager to go directly to the edit screen, without having to click the edit button first.

                    I’ve been looking around in the code already but I can’t find a solution for this. Maybe someone has a clue where I can change that option?

                    If the client is still unhappy, you might look at the FDM snippet, which would let the client edit in the front end.

                    (Or switch to MODx Revolution, where the client can double-click on an element in the tree.) wink

                      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
                      • 25663 MODX Staff
                      • 12,272 Posts
                      I wonder if this would be a good replacement behavior for the manager tree:
                      [*] Click to edit
                      [*] Right click to view page data

                      Tell us what you think in JIRA by voting ... in fact vote for ALL your favorite/most desired issues. laugh

                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me