Archive for October, 2008
I updated the code to provide content type and cck field information for custom modules to work with Drupal 6.
This is the method I’m using to run the import. This method resides in a site_profile module I use for common functions for restoring sites via installation profiles for deployment.
It works using exported ‘macros’ from the content_copy module data export form. The cck content_copy handles all the content type and field importing. If the types or fields already exist, they are not duplicated and are handled gracefully. Feedback is provided as fields and types are added.
I usually add a folder called ‘cck’ to my module folder and copy and paste the content_copy export data structure into separate files, like this
- …/modules/my_module
- …/modules/my_module/cck
- …/modules/my_module/cck/my_content_type.inc
- …/modules/my_module/cck/my_other_content_type.inc
I simply copy and paste the exported data from admin > content types > export into the .inc files.(…)
This is a blog to record tidbits of information. It documents thoughts and ideas that may be useful for other people, like yourself.