Keyword

JSON + All categories including all sub categories

  • Alexandros
  • Alexandros's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago #101994 by Alexandros
Hello,

I am trying to setup a K2 website to be used as a CMS for a mobile application.
I have seen that K2 now supports exporting data into JSON format, which is great, but I am facing an issue.
I need to have two "commands":
1. Will be all the items of some or all categories. This I think is easy since I can just create a category menu and select the categories I want to get items from.

2. To get all the categories including all the sub-categories. Basically, I need a way to get the categories tree in JSON. And this is where I need help. I created a root category and a category menu which I then selected to display only the the root category. This way I can see the first level sub categories of the root category but not their sub subcategories.

So bottom line is, how can I create a page that will list the category tree from root to the last sub category.

Thanks in advance.

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #101995 by Lefteris
Hi. You cannot do this using just K2. You need to write custom code to achieve this.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Alexandros
  • Alexandros's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago #101996 by Alexandros
Hello,

Any idea on how that custom code will look like?

Thanks in advance.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum