0

i created 2 nodes in Company CCK under taxonomy A, 2 nodes in Company CCk under taxonomy B. now i want to get a json parse for all the nodes in a taxonomy A.

I tried like this www.mywebsite/api/taxonomy_term?selectNodes&parameters[tid]=1 it gives the value of that taxonomy term but, i wont get nodes under that category . In what way the url should be framed for attaining values of nodes of a particular category(taxonomy) i.e i would like to filter the nodes of my choice.

so any one help me, Thanks in advance

  • Which Drupal 6 or 7 ? – niksmac Apr 16 '12 at 10:42
  • Ya ,In drupal7. – Ramaraju.d Apr 16 '12 at 10:52
1

you can use taxonomy_select_nodes to find all nodes associated with a term.

Return nodes attached to a term across all field instances.

Parameters

$tid: The term ID.

$pager: Boolean to indicate whether a pager should be used.

$limit: Integer. The maximum number of nodes to find. Set to FALSE for no limit.

$order: An array of fields and directions.

API

| improve this answer | |
  • Is it not possible through url instead of code? – Ramaraju.d Apr 16 '12 at 11:33
  • How is that possible ? !!!! – niksmac Apr 16 '12 at 11:35
  • suppose if i want to get node values of content type named machine url will be www.website.com/api/node?parameters[type]=machine this gives me all the nodes of machine content type. i am using REST server – Ramaraju.d Apr 16 '12 at 11:40

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.