We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37523
    • 141 Posts
    I have a number of favourite snippets and chunks I like to use regularly on my modx sites. Is there a way to export these from one install to another?

    This is not to transfer/move an entire site but rather just parts of it such as snippets and chunks.

    Many thanks in advance.

    This question has been answered by BobRay. See the first response.

      Glyn Szasz
      Sydney, Australia

      Happy to help (when can) and happy to learn

      If you are a Sydney based MODX developer would love to hear from you. Please contact me.
      • 49529
      • 196 Posts
      Hi
      you can either make them static (e.g. store them in external files, say .tpl or .html for chunks and .php for snippets), or convert them into installable packages and the install them via package manager as regular Extras. The second way is pretty tricky though.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Using My Component it's pretty easy to create a transport package with chunks and snippets. I set up a site on localhost, get it the way I want it, then use Vapor or Teleport to make a transport package out of the whole thing. Vapor will probably do just fine for small starter sites.
          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
        • discuss.answer
          • 3749
          • 24,544 Posts
          With MyComponent, you only need to get the config file correct. Then run Bootstrap once. From then on, any time you make a change you just run ExportObjects and Build and you'll have a transport package that will let you install or update them on any MODX site.

          If you don't update them very often, you could also use PackMan to create your package.
            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
            • 37523
            • 141 Posts
            Many thanks BobRay and sottwell for your answers. PackMan worked well.
              Glyn Szasz
              Sydney, Australia

              Happy to help (when can) and happy to learn

              If you are a Sydney based MODX developer would love to hear from you. Please contact me.
              • 3749
              • 24,544 Posts
              I'm glad I could help. For others who find this topic, I should mention that PackMan's main weakness is that it doesn't do resources.
                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