We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34178
    • 212 Posts
    Is there a way to reorder the manager tabs: modx-resource-settings, modx-page-settings, modx-panel-resource-tv?

    Can anybody help to do this?

    I cannot find the part of the manager-template where you can change this.

    This question has been answered by multiple community members. See the first response.

    • As far as I know, the best you can do is create new tabs, put the fields into the new tabs, then hide the default tabs. This would be done in the Manager Customization in the Manager.
        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
        • 34178
        • 212 Posts
        Quote from: sottwell at Feb 11, 2016, 02:57 PM
        As far as I know, the best you can do is create new tabs, put the fields into the new tabs, then hide the default tabs. This would be done in the Manager Customization in the Manager.
        Thanks a lot for your reply!! Do you think it would also be possible to reach this by template-changes? I think somewhere (in a file? in the database?) the order of the tabs must be contained?
          • 34178
          • 212 Posts
          PS: I now have hidden the default tabs but the result is that there is per default no activated tab anymore.

          The purpose was to improve the working process for editors when they correct e. g. an article and press 'save" very often. This means they always have to navigate again to the point where they have been when saved the document what is no fun if they work on text in a TV.

          In my opinion it should be possible to determine which tab is activated per default.

          What do you think about this?
            • 34178
            • 212 Posts
            Nobody an idea how to make changes at the default manager layout?
              • 3749
              • 24,544 Posts
              I think a better solution might be to have the tab the person is on persist across page reloads. That would make a good feature request.

              Another (better) possibility would be to not have the page reload at all, especially when updating an existing resource.
                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
                • 42562
                • 1,145 Posts
                I asked @bezumkin your question, this is the working example he gave .... please see attachment for proof
                switch ($modx->event->name) {
                    case 'OnBeforeManagerPageInit':
                        $modx->controller->addHtml('
                        <script>
                            Ext.ComponentMgr.onAvailable("modx-resource-tabs", function() {
                                // Order of tabs
                                var tabs = {
                                    "modx-panel-resource-tv": null,
                                    "modx-page-settings": null,
                                    "modx-resource-settings": null,
                                    "modx-resource-access-permissions": null,
                                };
                                
                                var i, item, id;
                                for (i in this.items) {
                                    if (this.items.hasOwnProperty(i)) {
                                        item = this.items[i];
                                        id = item["id"];
                                        // TV tab has no id for some reason
                                        if (id == undefined && item["xtype"] == "modx-panel-resource-tv") {
                                            id = "modx-panel-resource-tv";
                                        }
                                        tabs[id] = item;
                                    }
                                }
                                
                                this.items = [];
                                for (i in tabs) {
                                    if (tabs.hasOwnProperty(i)) {
                                        this.items.push(tabs[i]);
                                    }
                                }
                            });
                        </script>
                        ');
                        break;
                }
                  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.
                  • 34178
                  • 212 Posts
                  @donshakespeare: Thanks a lot! One question: How and where do I have to implement this? Is this suggested as a plugin or do I have to add the code into a certain file?
                  • Looks like a plugin, using the OnBeforeManagerPageInit event.
                      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
                      • 34178
                      • 212 Posts
                      Quote from: BobRay at Feb 20, 2016, 09:57 PM
                      I think a better solution might be to have the tab the person is on persist across page reloads. That would make a good feature request.

                      Another (better) possibility would be to not have the page reload at all, especially when updating an existing resource.

                      That would both be a good idea. What do you think how big is the chance that this will be realized?