We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36573
    • 173 Posts
    Thanks for all your help Bob.
      Everything I know I learned on the internet. Saved me thousands in College tuition,
      • 3749
      • 24,544 Posts
      You're welcome. smiley
        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
        • 42562
        • 1,145 Posts
        I just found this thread, should have found it sooner. Excellent diagram.

        @BobRay
        It seems MyComponent is skipping over static elements.
        It grabs the snippet code alright, but does not have the static feature when the packaged is built. Is this resolver issue (I am just throwing about larger-than-me vocabulary)

        Any insights? I know working with static elements is bad business, but I want to give users a way to meddle with Responsive FM MODx configs instead of browsing for the files on the server, it also provides a quick way to duplicate the snippet to avoid overriding.

        If only I could include rawModxSnippet; in an external file I would not bother about static madness.

        Am I going about this the wrong way?
          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.
          • 3749
          • 24,544 Posts
          You're correct about the static elements. My thinking was that many people would use static elements during development but wouldn't want to impose that on the users of the package who might not want that. Also, the path to the static element usually wouldn't be correct.

          I think you could add code to set them to static in the default resolver, using MODX_BASE_PATH to set the file path.
            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
            • 42562
            • 1,145 Posts
            Well. I have been meddling with this resolver thing, and I reckon I will just leave it be. People can find the files directly.
            Dealing with static files is too much stress.
              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.
              • 3749
              • 24,544 Posts
              I generally don't use them. Since you can import and export back and forth between the files and the MODX objects with MC, making them static just confuses me and makes me risk losing my work. It can also crap up Git somewhat.
                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
                • 42562
                • 1,145 Posts
                I found tonight that I need to do something else in order to make MyComponent read my sub categories....!
                Is this how it behaves, or is too late and I am half moron with the full moon?

                I thought nesting one level deep would be a nice way to keep things in order.

                May be
                    /* ************************* CATEGORIES *************************** */
                    /* (optional) List of categories. This is only necessary if you
                     * need to categories other than the one named for packageName
                     * or want to nest categories.
                    */
                
                    'categories' => array(),


                I did
                categories' => array('elfinderVolumes', 'ResponsiveFileManager', 'RoxyFileman', 'TinyMCEinits', 'elFinder'),
                and MyComponents caught fire [ed. note: donshakespeare last edited this post 8 years, 8 months ago.]
                  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.
                  • 42562
                  • 1,145 Posts
                  Okay, so I put my brain back where it should be, looked at MyComponent's example.config, and it worked marvelously.
                          'categories' => array(
                          'TinymceWrapper' => array(
                              'category' => 'TinymceWrapper',
                              'parent' => '',  /* top level category */
                          ),
                          'elfinderVolumes' => array(
                              'category' => 'elfinderVolumes',
                              'parent' => 'TinymceWrapper', /* nested */
                          ),
                          'ResponsiveFileManager' => array(
                              'category' => 'ResponsiveFileManager',
                              'parent' => 'TinymceWrapper', /* nested*/
                          ),
                          'RoxyFileman' => array(
                              'category' => 'RoxyFileman',
                              'parent' => 'TinymceWrapper', /* nested */
                          ),
                          'TinyMCEinits' => array(
                              'category' => 'TinyMCEinits',
                              'parent' => 'TinymceWrapper', /* nested */
                          ),
                          'elFinder' => array(
                              'category' => 'elFinder',
                              'parent' => 'TinymceWrapper', /* nested*/
                          )
                      ) ,
                  
                    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.
                    • 3749
                    • 24,544 Posts
                    I'm glad you got it worked out. smiley
                      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
                      • 42562
                      • 1,145 Posts
                      Well, it seems I am climbing the ladder, the direction of the climbing is another story.

                      I would like to set install.options to give user choice of what to add...so as not to flood them with chunks and options.
                      I see the sample user.input.php. but what would a resolver look like?

                      Thanks so much already.
                        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.