Feed Element Mapper should be able to map to node title and node body just as to any other element.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | feedapi_mapper_node.patch | 153 bytes | siharris |
| #3 | 341377_node_module_mapper.patch | 1.25 KB | alex_b |
Feed Element Mapper should be able to map to node title and node body just as to any other element.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | feedapi_mapper_node.patch | 153 bytes | siharris |
| #3 | 341377_node_module_mapper.patch | 1.25 KB | alex_b |
Comments
Comment #1
alex_b commentedMake sure 'mapping to 0' = hiding these fields is possible #323501: Hiding selected feed mappings?
Comment #2
alex_b commentedMore accurate title.
Comment #3
alex_b commentedThat's my first shot at this. Mapping to title, created date and body working quite well. It's going to be harder to make this completely override default feedapi node processor mappings. With completely override I mean e. g. not storing any body if the description -> body mapping is removed.
Comment #4
alex_b commentedI committed this to HEAD.
What's missing is full overridability as described in #3.
Per default mapper should show mappings as executed by feedapi_node, if these mappings are removed, targets should stay empty.
I need to think better on how to build this but for now I am thinking there should be a 'default' $op in hook_feedapi_mapper() that allows a mapper to define a default mapping. This default mapping is used to execute mappings on feed items that don't have a mapper defined and it is used to populate the configuration form.
Comment #5
siharris commentedWhen you're mapping a feed element to body, looks like FeedAPI still maps the description to teaser.
This patch also maps the chosen feed element to the teaser if you're mapping to body.
Comment #6
KoCo commented+1 subscribe
Comment #7
alex_b commented#5 - this is actually OT, could you post a patch according to coding standards http://drupal.org/coding-standards on a separate issue? Thank you!
Comment #8
robertdjung commentedsubscribe
Comment #9
iva2k commented@alex_b:
Got a patch attached to a new issue #504642: Node teaser mapped from description - want to copy node body to teaser upon mapping . Please review there.
Comment #10
giorgio79 commentedHello,
I have title and body in my feed, yet, they do not get imported.
I have followed Sean's steps here, http://drupaltherapy.com/node/34, and I notice he did not need to map title and body feed fields, to his title and body node fields, and automagically it worked for him.
Still I checked, and even if I wanted to, on feed element mapper, the title and body fields do not show up in the dropdowns so I cannot tell the feed mapper to put my title and body from csv into the title and body of the node.
Can someone give me some light?
When I try to do the import all my nodes were imported with "No Title"
Even in the preview it shows "No Title"
Comment #11
giorgio79 commentedHmm, Alex I also checked your patch, but apparently there is no feedapi_mapper_node in my mappers folder in the latest version of the module? Has it been dropped?
I notice it exists in previous versions.
Comment #12
giorgio79 commentedSorry, it seems my feedapi mapper was not updated properly, so the node mapping file exists, yet the title and body was not imported.
I will try with mapping the title raw and body raw instead of the plain title and body now.
Comment #13
giorgio79 commentedOk, I got it to work finally by using the Title (raw) and body (raw) mappings, because those were coming straight from the csv file.
Thanks for this.
Comment #14
giorgio79 commentedI guess I can set it straight to fixed :P
Comment #15
alex_b commentedgiorgio79: I think you misunderstood the issue. But I must say that the focus of this issue has shifted in #4 which is not ideal anyway.
I'd like to leave this closed then. I'll rename this issue to its original title and open a separate one for full overridability:
#518180: Full overridability of node title, body, etc mapping
Comment #17
emilyf commentedI'm sorry to reopen this issue, but I'm trying to figure out what other issue I should be following. I want to be able to map the feed description field to a custom field in my content type that is NOT the generic body field.
I am using the 2.x alpha release.
I looked here http://drupal.org/node/518180 which references 2 other issues but neither of those issues is explicit in saying it will do this.
Comment #18
emilyf commentedAgggg. Sorry, I understand now. For anyone else trying to figure this out, this feature is indeed rolled into the 2.x version. You just need to delete the pre-mapped description element for it to show up in the mapping drop down.