0

I am using the services module. When I call domain.com/json/node/3 is it possible to ask for a specific view mode of the node ?

Something like this ?

domain.com/json/node/teaser/3

Thanks!

2

Nope, Drupal Services just return the node object by default. Looking at the end points in node_resource.inc, it would seem it would not be hard to build thou.

  • If youre building it try using the services output alter hook. drupalcode.org/project/services.git/blob/refs/heads/7.x-3.x:/… – niksmac Mar 17 '14 at 14:18
  • Perfect! I did not see that function. This is just what I need. – Jens Mar 17 '14 at 15:15
  • 1
    Maybe afterwards I should write some docs for services. It is a good and important module, but the documentation could use a lot of work. – Jens Mar 17 '14 at 15:17
  • looking forward to the added documentation – Andre Baumeier Mar 17 '14 at 15:37

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.