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.
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.
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.
-
☆ 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.
discuss.answer
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.
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.
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.