rsanchez / json

Output ExpressionEngine data in JSON format.
http://devot-ee.com/add-ons/json/
100 stars 236 forks source link

Category Info #7

Closed rmdort closed 12 years ago

rmdort commented 12 years ago

Hi Rob,

Could you add category info of an entry in the jSON output.

rsanchez commented 12 years ago

Grab the develop branch and use the show_categories="yes" parameter on the {exp:json:entries} tag.

rmdort commented 12 years ago

Works.. Thanks rob.

rmdort commented 12 years ago

Hi Rob. I was wondering if you could also limit the entries by categories

{exp:json:entries channel="products" category="1|2|10"}

rsanchez commented 12 years ago

Yes, you should be able to do that. Json extends the channel module and should inherit its parameters.

rmdort commented 12 years ago

Hi Rob. Yes thats right. Its working. I have 4 category groups assigned to a channel, and so the json outputs all the categories assigned to it

Eg : http://pastie.org/2975736

This increases the size of the json file. Is there anyway i can choose a category of specific category_group only in the json. Like a show_category_group="2" parameter?

rsanchez commented 12 years ago

Added a show_category_group param to develop branch.

rmdort commented 12 years ago

Thanks a lot Rob. Works great.

nate8684 commented 12 years ago

I'm seeing that it output the category information when I go to my page, however when I try to access it with code it doesn't work. It will pull everything but category information, any thoughts on why this is?