views_datasource 6.x-1.0-alpha1

allisterbeharry - May 25, 2008 - 08:05
Download Size md5 hash
views_datasource-6.x-1.0-alpha1.tar.gz 9.14 KB e2010d60482c2710c89f0a488445eafb
Official release from CVS tag: DRUPAL-6--1-0-ALPHA1
Last updated: May 25, 2008 - 08:10

This is a proof-of-concept release with a working views_json plugin for Drupal 6. In the Views interface simply select the view style as JSON data document (Exhibit format only) and the row style as Unformatted (separator must be |). Because the template changes the page Content-type to text/javascript and immediately exits Drupal, the live preview will throw an error. This can be ignored; just save your view as a page and view it normally at the URL to get the JSON output. I forgot to remove a debug print statement at the top so you will see Array
(
[format] => Exhibit
)
before the JSON output.

Edit views-view-json.tpl.php and comment out the print_r($options); on line 17.

 
 

Drupal is a registered trademark of Dries Buytaert.