6

I want to pull a JSON file out of a view that has images. This is similar to the way views_datasource works in D6. I am not a drupal coder, but I would like to give this a try. but I am guessing that is would be something like http://mearra.com/blogs/juha-niemi/drupal-7-custom-node-view-modes#comment-218

but I would like to make this a module as much as possible. any sample code, examples would be great. thanks

migrated from stackoverflow.com Aug 7 '11 at 17:46

This question came from our site for professional and enthusiast programmers.

4

There is now a Drupal 7 version of Views Datasource. Here is a quote about it (from the module's project page):

... is a set of plugins for Drupal Views for rendering content in a number of shareable, reusable formats based on XML, JSON and XHTML. These formats allow content in a Drupal site to be easily used as data sources for Semantic Web clients and web mash-ups. Views Datasource plugins output content from node lists created in the Drupal Views interface in a variety of formats - XML data documents using schemas like OPML and Atom, RDF data documents using a vocabulary like FOAF, JSON data documents in a format like Exhibit JSON, and XHTML data documents using a microformat like hCard.

The project consists of 4 Views style plugins (and related row plugins):

  • views_xml - Output as raw XML, OPML, and Atom;
  • views_json - Output as Simile/Exhibit JSON, Canonical JSON, JSONP/JSON in script;
  • views_rdf- Output as FOAF, SIOC, and DOAP;
  • views_xhtml - Output as hCard, hCalendar, and Geo.
1

The referenced article is about view mode which have nothing to do with Views and almost none with the output format of a page.

Note there is an ongoing effort to port Views Datasource to Drupal 7 with a dev. version available outside of Drupal.org.

0

views json

This module is meant for people doing heavy-duty JS work. Knowledge of JSON, jQuery, and a bit of Views internals is needed to fully utilize this module.

views datasource

Views Datasource is a set of plugins for Drupal Views for rendering content in a number of shareable, reusable formats based on XML, JSON and XHTML. These formats allow content in a Drupal site to be easily used as data sources for Semantic Web clients and web mash-ups. Views Datasource plugins output content from node lists created in the Drupal Views interface in a variety of formats - XML data documents using schemas like OPML and Atom, RDF data documents using a vocabulary like FOAF, JSON data documents in a format like Exhibit JSON, and XHTML data documents using a microformat like hCard.

Views Datasource can be thought of as a userland complement to the work going on in the Services and RDF APIs as a site operator only needs to know Views to be able to create datasources in the different formats.

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.