Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Feeds set-up for Aps

Here is some documentation for setting up feeds in Drupal 7 so that An iphone or Android ap can access the data.

The data brought together using Views and then output using the JSON from the "views_datasource" module.

  1. Install Views Datasource Module
  2. Turn on the submodule of "Views JSON" created by the datasouce module.
  3. Build your View using the Format of "JSON data document" with the following settings (screenshot) 
     [[{"type":"media","view_mode":"media_original","fid":"2","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]
  4. Add any fields you want to be present in the feed. (see below)
  5. Set up a path to show it as an xml document (see below)
     [[{"type":"media","view_mode":"media_original","fid":"3","attributes":{"alt":"","class":"media-image","typeof":"foaf:Image"}}]]
  6. Some alteration may be needed depending on whether the output for any given field need html or not.  Those alterations are made on a field by field basis within the view.
Author: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web