content_copy.inc
Roger López - September 19, 2008 - 17:48
| Project: | Install Profile API |
| Version: | 6.x-1.x-dev |
| Component: | CRUD functions and includes |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
This include file provides content type import functionality based on the content_copy module's export data. Each content type export goes in its own file.
Usage is as follows:
1. Place output from content type export as-is into an inc file. The only additional piece that needs to be in this file is an opening php tag.
2. In your install profile code, make sure that content_copy.module is required.
3. Make a call like so:
<?php
install_content_copy_import_from_file('path/to/file.inc');
?>| Attachment | Size |
|---|---|
| install_profile-content_copy.patch | 804 bytes |

#1
Absolutely fantastic! I love that it's an inc file for content_copy.module. This is certainly a much more efficient approach than creating a node type with node.inc then creating individual fields with content.inc. I added additional inline documentation and committed. Thanks!
#2
This is tight! Thanks.
#3
Susbscribe.
-Victor
http://drupalsearch.org
#4
Thanks for the tip to this post Moshe.
Will this code work in the context of a vanilla D6 Module Install File or only in an Install Profile? I haven't played w/ install profiles.
Thanx for any clarification.
#5
This works in any install file. You just have to do an include before you use these functions. The name of this module is quite misleading. sorry about that.
#6
Automatically closed -- issue fixed for two weeks with no activity.
#7
Seems that this was only committed to 5.x. D6 CCK is out now. Are any changes needed?
#8
I believe it was only committed to the Drupal 6 branch, that's what we've been using it for.
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/install_pro...
#9
sorry - my bad
#10
Automatically closed -- issue fixed for two weeks with no activity.