MarieComet / mc-acf-flexible-template

WordPress plugin makes it possible to save the ACF flexible content fields as templates
71 stars 20 forks source link

inter-site import/export a.k.a. site-independant serialization #18

Open drzraf opened 4 years ago

drzraf commented 4 years ago

ACF template helps me translating complex flexible field contents from one site to another one.

Describe the solution you'd like I'd like to be able to export/import a template from one WordPress instance to another. It'd only include attached images if importer was told so at the time of import.

Describe alternatives you've considered Since ACF templates are custom post types. I thought standard tools would support it out of the box.

This results in a new ACF template :

  1. Being imported and created
  2. Being listed
  3. Having its correct meta attached
  4. Whic appears as empty in the template editor UI.

Additional context Templates are mostly stored in a _flex_layout_data which is serialized. But "here is the point" : the serialized form is not "installation-independant". It's probably related to why imported templates are shown as empty.

MarieComet commented 4 years ago

I'm sorry but I don't understand what's you mean by "the serialized form is not "installation-independant""

drzraf commented 4 years ago

The storage of an ACF template keeps referencing other elements of the website. As such it can't be exported/imported as-is into another website that would want to make use of this template.