Hi,
When working on a custom fieldtype, I instantiate the channel_categories API as Greg supposed in http://ellislab.com/forums/viewthread/171765/:
$this->EE->load->library('api');
$this->EE->api->instantiate('channel_categories');
$group_id = '2';
$the_cats = $this->EE->api_channel_categories->category_tree($group_id);The Problem: no matter what group_id I set, I always get an array of all categories from all category groups. I’ve tried to use an array for selecting the category group:
$group_id[] = '2';
$the_cats = $this->EE->api_channel_categories->category_tree($group_id);an empty array is returned.
Anybody else experienced problems using the channel_categories API?
I’m using EE 2.1.1 build 20101020
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.