0

Passing a context from the panel to the view.

Need the view to accept the context and then consume an RSS feed.

For example: visiting /stock/MSFT would pass in MSFT to the view. The view would then hit http://finance.yahoo.com/rss/industry?s=MSFT and consume that RSS content.

I know you can consume a static feed with the Aggregator or Feeds module but what about a dynamic one. Any ideas?

Thanks!!

1

For those of you interested -- the only way I could figure out how to solve this was with writing a custom cTools plugin (See: What are Ctools plugin (content type, access, etc), and how does one create them?).

In that plugin I created a block and placed it in the panel.

I used Magpie RSS for the parsing/fetching of the feed.

0

You will need to add a contextual filter to your view (in the Advanced column).

If you have added a feed with the title MSFT, then add the contextual filter 'Aggregator feed: Title'. In the second step, configure the filter value to 'Provide default value' and type is 'Raw value from URL'. Then you can navigate to /your-page/MSFT.

  • So for 200 stocks, I'd have to input each feed individually? – ryanka Dec 2 '14 at 20:47
  • The panel passes the stock name to the view already (It's a taxonomy page override). The view will then take that stock name, grab the URL and display it accordingly. – ryanka Dec 2 '14 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.