I use FeedApi and Feed Element Mapper, and they together work great for mapping feed elements to CCK fields. But is it also possible to separate a single feed element to several parts and store these parts to separate CCK fields with Feed Element Mapper?

I use a feed that has 3 information blocks in the <title> element, separated by " - ". For example:

...
<title>Fashion Instructor - The Art Institute -  Charlotte, NC</title>   
...

I would like to store the first block (in the example: Fashion Instructor) to CCK field Job, the second block (in the example: The Art Institute) to CCK field company and the third block (in the example: Charlotte, NC) to CCK field city.

Is this somehow possible with Feed Element Mapper and FeedApi?

Comments

alex_b’s picture

It is possible. Set up a module that implements hook_feedapi_mapper() and splits the incoming string and sticks it into the right places on the node.

Here is a step by step guide on how to create your own mapper:

http://www.developmentseed.org/blog/2008/jan/24/build-your-own-mapper-fe...

If you do this, it would be great if you could tell us how it went - e. g. on http://groups.drupal.org/rss-aggregation

alex

alex_b’s picture

Status: Active » Closed (fixed)