We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    In this tutorial, we’ll show you how to extend your Doodles snippet to have a custom manager interface to create/remove/update Doodles with, adding pages straight into the manager (but separate from the core to retain upgradability), using MODx’s ExtJS extension - MODExt, xPDO and also creating Actions and Menus to create the pages and the new top menu items.

    Note: This tutorial will only work with the latest SVN revison of Revolution (r3831), or the very-soon-to-be-released Revolution-alpha-2.

    http://svn.modxcms.com/docs/display/~splittingred/2008/07/10/Creating+Custom+Manager+Pages+for+a+3rd+Party+Component%2C+Pt.+I

    Enjoy! Please paste comments/questions in this thread.
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
    • Amazing series Shaun ... gracias!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • Wow, that’s a great tutorial - filled a few of gaps in my knowledge of how to create custom manager pages. Thanks Shaun cool
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 34127
          • 135 Posts
          Great tutorial - I can definitely use it for a couple of projects I’ve been working on! I managed to get everything working correctly, but in Pt 2, should we also include the list.php file in the index.php file (or just stick the code from list.php in index.php)? I couldn’t get it working otherwise (blank page).

          When we’re actually packaging Doodles up, should we set a resolver for the modContext we created? I’ve set the ID to the "doodles" context, but when I hit save an error pops up saying "Object not found!".
            • 28215
            • 4,149 Posts
            Quote from: Ricjustsaid at Jul 24, 2008, 12:48 AM

            Great tutorial - I can definitely use it for a couple of projects I’ve been working on! I managed to get everything working correctly, but in Pt 2, should we also include the list.php file in the index.php file (or just stick the code from list.php in index.php)? I couldn’t get it working otherwise (blank page).

            Actually, the last picture is wrong - the menu should be attached to the action: doodles - list/index.php (which means list.php, it’s a bug to-be-fixed). I’ll try and fix that today.

            Quote from: Ricjustsaid at Jul 24, 2008, 12:48 AM

            When we’re actually packaging Doodles up, should we set a resolver for the modContext we created? I’ve set the ID to the "doodles" context, but when I hit save an error pops up saying "Object not found!".

            This seems to be a bug with the package builder. We’ve been having some issues with it. If you want a quick fix, make sure line 14 (right before the switch statement) of core/model/modx/processors/workspace/builder/vehicle/create.php is:

            $pk = $_POST['object'];
              shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
              • 24719
              • 194 Posts
              Really great tutorial Shaun.

              But, would it be possible to do this kind of thing on the front-end, e.g. build an ajax-driven web site that used smarty templates and interacted with the core using connectors, processors and controllers?

              What changes would you need to make for this to work (do modActions still work on the front end?)?

              cheers

                • 28215
                • 4,149 Posts
                Quote from: redman at Jul 29, 2008, 10:47 AM

                But, would it be possible to do this kind of thing on the front-end, e.g. build an ajax-driven web site that used smarty templates and interacted with the core using connectors, processors and controllers?

                I can’t see why not. But I’m not sure why you would.


                What changes would you need to make for this to work (do modActions still work on the front end?)?
                modActions work in any context. However, you’d need to make a request handler to do so. Create a request handler class that extends modRequest, then in your context that you’re initializing (I’m assuming you’d create a new context on the front-end instead of ’web’, correct? If not just use the web context), and fill it out like modManagerRequest does. Create a Context Setting with a key of ’modRequest.class’ and change it to the class name you created.

                That should work - I haven’t really tested it, but feel free to provide feedback.
                  shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • Maybe as a back-end to something like this? http://www.cushycms.com/
                    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
                    • 24719
                    • 194 Posts
                    cool, thanks for the tip.

                    sottwell is spot on - i’m thinking of rich ajax apps. will keep you posted.
                      • 2790
                      • 11 Posts
                      Hi,

                      thanks for this great tutorial, I’m currently making my way through.
                      A little correction: In the file/directory listing in part I, I guess the subdirectory for the lexicon file should be named "en" instead of "english" as otherwise it’s not working in alpha 3.

                      Regards,
                      Thomas