Content Importer

Categories

Component ID

482338

Component name

Content Importer

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

14

Component created

Component changed

Component body

This is a light-weight module geared towards developers for creating content (either starter content, or required content) from code.
It uses the uuid module to import content from a hook, then provides you (the developer) the ability to save that uuid in the hook so that it will show as 'imported'.

If you're looking for an even slightly more robust solution for importing content, then you're looking for feeds or migrate.

<?php
/**
 * Creates a new imported entity.
 */
function hook_content_importer_info() {
  return array(
    'unique-key-identifier' => array(
      'title' => 'Content title',
      'field_custom_field' => 'custom field value set by the metadata wrapper',
      'entity_type' => 'node',
      'bundle' => 'page',
      'uuid' => 'auto-generated-uuid',
    ),
  );
}
?>

The 7.x-1.x version is a completely different rewrite from the 6.x-1.x, written by JoshuaRogers which is now archived here and will not be supported here.