Pennebaker / craftcms-thearchitect

CraftCMS plugin to generate content models from JSON data.
MIT License
171 stars 9 forks source link

Provide export functionality #7

Closed timeverts closed 8 years ago

timeverts commented 8 years ago

Just logging a feature request here to be implemented once the plugin has matured.

It would be great if it were possible to use your plugin on an existing site to export the site's fields, sections, entries etc. and then output a JSON file of that setup, structured in your plugin's expected format. That way we could easily setup another site with exactly the same elements, by installing your plugin on that site, and then importing that exported JSON file.

spAnser commented 8 years ago

Export functionality has been started on.

At the time of this comment. Fields and Sections exporting is working from the master branch.

spAnser commented 8 years ago

v1.1.0 is out with Export functionality.

There is some things that either need to be address or left up to the user.

You cannot simply export an entire site and re-import it in the current state.

The Plugin imports things in a very specific order.

Groups > Sections > Fields > Entry Types > Sources > Transforms > Globals

Now fields that reference sources need those import before fields but a source might have a field layout where it needs some fields imported first. Currently if this is the case you need to separate your import json to do sources with their used fields first. Then import the remaining things after.

Idea to fix this is to implement a way to create the Sources before fields but generate their field layouts after fields are imported.