myfields = array ($feed_element); } if (is_array($feed_element)) { $node->myfields[$subfield] = $feed_element; } return $node; } } } /** * Implement hook_feedapi_mapper_elements to define standard elements that your * configuration should be able to map to. * * When FeedAPI Mapper exposes the mapping form on a feed node (node/%/map), it * parses the feed and uses the result to make elements of it available as * mapping sources. * * However, when FeedAPI mapper exposes the mapping form on a content type * form (admin/content/node-type/%/map), there is no feed to parse for * discovering feed elements. In this case FeedAPI Mapper exposes some standard * elements. You may find yourself in the need for more specific standard * elements on the content type level, in this case implement * hook_feedapi_mapper_elements() in your module. * * @see _feedapi_mapper_get_standard_elements(). * * @return * An array of arrays that describe the path to a feed element on a feed. */ function hook_feedapi_mapper_elements() { return array( array('options', 'raw', 'headquarter', 'name'), array('options', 'raw', 'headquarter', 'city'), array('options', 'raw', 'headquarter', 'street'), array('options', 'raw', 'headquarter', 'country'), ); }