Support mapping to feed
alex_b - March 10, 2009 - 20:13
| Project: | Feed Element Mapper |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Currently, FEMP only supports mapping to feed items.
What if you'd like to map your feed's image to an image field? Or your feed's description to a CCK field. Using the feed node as mapping target should be easy to do.
* Offer mapping UI for feed node (could be stacked under the feed item UI, could get long, but #397650: Improve and separate mapping UI would solve this)
* Run feed node through _feedapi_mapper_map() on nodeapi.

#1
#2
+1 for this
In fact, I'd be willing to take a stab at this, but I'm new to FEMP and really Feed API in general. Any ideas on the best approach? I'm guessing the critical piece is an implementation of hook_feedapi_mapper, but I'm not sure I understand how to stop the creation of the feed item nodes. Do I need to create a new processor too, that could essentially pass in the feed node for mapping?
I was looking at this tutorial, but again it seems to assume to want to create item nodes:
http://developmentseed.org/blog/2008/jan/24/build-your-own-mapper-feed-e...
#3
#2: First, please read the code of the existing implementation. OTOH, the missing piece will be that $feed_node needs to be saved after feed refresh. As far as I can see, the mapping API (hook_feedapi_mapper()) already allows mappers to expose targets on a feed node. Haven't ever tried it yet though.
Please implement on latest branch.