Posted by fas.khan on December 4, 2012 at 9:27pm
Hi,
I am completely new to Drupal and have actually never used it.
I am actually making few changes in the app that brings in data through JSON from a Drupal site.
The Location where the JSON is placed is somewhat :-
Site_URL/../api/rest/views/content.json
This creates JSON for the 10 latest articles.
This is the problem, that I want it to generate JSON for all the articles and not the latest 10. I tried but I couldn't succeed.
I'll be very thankful if you can either assist me in showing all the articles within this JSON or you can tell me some other easy way, which can show me all the articles in JSON format ...
Thanks a lot....
Comments
I don't have services at
I don't have services at front of me, but as i'm not wrong you may do a view which lists all articles and than create a json of that view (first thought).
Thanks a lot. Could you help
Thanks a lot.
Could you help me a little in creating a view which lists all the articles?
I am a complete n00b in this and would appreciate your help a lot...
Thanks.
1) install
1) install http://drupal.org/project/ctools ctool ( views need it)
2) install http://drupal.org/project/views this module ( and enable it)
3) http://www.youtube.com/watch?v=4WOeRgtuobg watch this or all similar video about view. It may give you more than my letters :)
If you will have problem i am open to help
Hi wichr, I was able to use
Hi wichr,
I was able to use views but unfortunately, I am still unsure how to generate JSON for my content.
I need JSON in such manner that it automatically gets all the content (including latest) from the Drupal site.
Could you please further assist.
I am very thankful to you.
So as i see you may have 2
So as i see you may have 2 options.
Firs - create new view ect. and get json (but if you don't understand how services works it may take you more time).
Sec - edit view which (as i supposed you have already) to display not last 10 articles but all. So what you have to do is change
"
PAGER
Use pager:Display a specified number of items | 10 items
More link:No"
To
PAGER
Use pager:Display a specified number of items | "Display all items"
More link:No
This will allow you to display all published articles.
If not tell me what kind of setting you have right now.
_
If you don't want to get into the weeds of services, you can also use views_datasource to create a view at a particular url that outputs json.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Hi Guys,I am coming back to
Hi Guys,
I am coming back to this problem, as I am still unable to solve it.
I am trying to pull all articles from my site in form of JSON.
I know it can be done by either Services, RESTful Web Services or Views Datasource but I don't know how to do it. I am a complete n00b in Drupal.
Could you specify me, with an example hopefully, that how can I pull all articles in a JSON and show that JSON through a URL?
Many Many Thanks.
P.S. Btw, I need it for Titanium.