We do not have the option to create multiple self node processors on one node type.

As an example:
- Take the example_web_scraper. This imports the stanford agenda items.
Now let's say we want to import items from another university, but use the same node_type. This would make the management of the feeds better.

If you import from 10 different websites, than it will be a horror if you have to create a new node_type for every entry.

What i think would be a good scenario:
- In the self node processor define the parent, the importer which imports the list and creates the entries.
- Self node would first check if the feeds item id is the same as the parent if so, us the current self node to import.

Comments

Michsk’s picture

Ok, it looks like mappings don't override, so we can use one self node processor to process all articles / entries. Not sure if it's ideal.

Michsk’s picture

Issue summary: View changes

added more info

thomjjames’s picture

Issue summary: View changes

Hi,

I'm looking for similar functionality to this. Did you ever find a solution?

Cheers
Tom

Michsk’s picture

I think not, not sure what the road was we took eventually, it's almost a year ago.

timfelix’s picture

HI.

I also have multiple self node processors (feeds importers) attached to one content type.

I want to run just one of these feeds importers depending on the value of a 'feed type' field of the node.

so, for example, if the feed type filed of the node == 'news' then run the 'news importer' (self node processor).
If the node has my 'feed type' field == 'research' then run the 'research importer' (self node processor).

That is, to choose a single importer to run from multiple importers that are enabled.

---

In FeedsSelfNodeProcessor.inc I can add these lines to the process() function:

<?php
$wrapper = entity_metadata_wrapper('node', $node);
    $feedTypeField = $wrapper->field_feed_type->value();
    if($source->importer->config['name'] != $feedTypeField->name){
      return;
    }
?>

However, it only seems to be running the last feeds importer in the list and not calling each one.

If anyone has any ideas on how I might achieve this or whether I am doing this completely wrong.
It would be great to hear from you.

Many thanks

twistor’s picture

Status: Active » Closed (duplicate)