Many drupal users will probably create the same or similar flexinode content types. While not being very difficult, I might be nice if users can exchange their content types through import and export.
Many drupal users will probably create the same or similar flexinode content types. While not being very difficult, I might be nice if users can exchange their content types through import and export.
Comments
Comment #1
javanaut commentedYes, I could see a use for this. The current mechanism for such a task (for MySQL at least) would be something like the following:
Exporting:
Use mysqldump to dump the records in flexinode_type and flexinode_field. You'll need to identify the appropriate ctype_id by looking at the flexinode_type.name column.
This will give you the ctype_id. Assume for example that ctype_id was the number 2.
Then dump just the data into a file:
Importing:
You'll then need to edit the ctype_id in the exported_type.sql file to be a value that does not currently exist in your database. This is because the flexinode_type.ctype_id field is not auto_incremented, and it can't be for flexinode_field.ctype_id. New ids are generated programatically using db_next_id(). Therefore, this is a manual process of editing to match the database you're importing to so that you don't overwrite anything and the INSERTs succeed.
It shouldn't be too difficult to automate this, I wouldn't think.
Note: I've only been playing with flexinode for a few hours now, so I might have missed something here. From what I can see, this appears to be accurate.
Comment #2
Uwe Hermann commentedThe Plone people are using an XML format to save their equivalent of flexinode types (they call them archetypes, IIRC). Maybe we should create some XML export/import for types, too. Possibly even compatible with the Plone stuff for simple migration etc.?
Comment #3
Bèr Kessels commentedThere was another module that could export flexinodes.