I'm trying to create a json from Views, using Views Datasource.

The problem is that if I create a display "page", using Json as style, if I try to go to www.mysite.com/path/to/page the system doesn't return me the Json (as I see in the preview of the view) but an entire classic drupal page with the output of the json in the content region (so I've menus, regions, etc).

Is there a way to obtain the output as a simple json?

  • 1
    Ok, the answer is here: drupal.org/node/1778568#comment-6631208 I have to disable "Views API mode" – arrubiu Oct 22 '12 at 15:12
  • +1 You can answer your own question, not just comment. You should add that the 'Views API mode' is a setting in the Settings under Format section when editing the View. You'd get an upvote from me. – therobyouknow Jan 28 '14 at 17:06

The right way is to uncheck the "Views API" flag in display settings.

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.