We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37526
    • 3 Posts
    Hey,

    Is it possible through the modx or js api to put my backend plugin output in a new tab under the document manager? So I want a few input fields to be under a new, fifth, tab next to Access Rights.
    Alas, I can't find good documentation on this, nor any existing threads.
      • 33968
      • 863 Posts
      Hey jourik - have a look at part 2 of the Doodles tutorial for an idea of how to create an action and put together a custom manager page. Note that you don't necessarily need to use ExtJs for your page, you can use plain html if you like:

      http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution,+Part+II#DevelopinganExtrainMODXRevolution%2CPartII-ActionsandMenus
        • 37526
        • 3 Posts
        Hey Lucas,

        Thanks for the answer. However it looks like actions are there to create custom manager pages. What I'd like to do is extend the current Update Resource page (/action) to include another tab in the editing form, in which I can load my plugin data. I can't find information about that in the referenced post.
          • 37526
          • 3 Posts
          Hmm doesn't look like modx has the opportunity to extend default manager pages sad Can't find anything on the subject, anyway..
            • 33968
            • 863 Posts
            I'd like to think it's possible - it will certainly require some investigation though.

            What I would try is to create a plugin that runs on OnManagerPageInit (I think), using the following to load in your custom code:
            $modx->regClientStartupScript('path/to/your/code.js');
            


            You can use a simple if condition in your plugin to only include the code when the current page action is Resource/Update. That will get your code into the Resource Update page, but getting it to display where you want is not going to be so simple.

            I can't see a way to easily slot into the existing tab group. You might want to have a dig through the contents of manager/assets/modext/widgets/resource/ as that's where the core resource files for the manager are located.

            Or... hope that Shaun sees this post. He can give a definite yes or no as to whether it's possible and I'm really keen to hear his suggestions wink