We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

category_form_tree() not working

Development and Programming

Environ-IT's avatar
Environ-IT
26 posts
15 years ago
Environ-IT's avatar Environ-IT

Hello,

I’ve tried the following code as shown in the docs

$this->EE->load->library('api');
$this->EE->api->instantiate('channel_categories');
$this->EE->api->api_channel_structure->category_form_tree();

and also the following which I think is the (more) correct version of the above:

$this->EE->load->library('api');
$this->EE->api->instantiate('channel_categories');
$this->EE->api->api_channel_categories->category_form_tree();

But I get the following message: Message: Undefined property: Api::$api_channel_categories

Does anyone have any idea what I’m doing wrong?

(v2.1.0 Build 20101020 )

Thanks

Andrew

[Mod Edit: Moved to the Development and Programming forum]

       
Joe Paravisini's avatar
Joe Paravisini
50 posts
15 years ago
Joe Paravisini's avatar Joe Paravisini

switch

$this->EE->load->library('api');
$this->EE->api->instantiate('channel_categories');
$this->EE->api->api_channel_categories->category_form_tree();

to

$this->EE->load->library('api');
$this->EE->api->instantiate('channel_categories');
$this->EE->api_channel_categories->category_form_tree();
       
Environ-IT's avatar
Environ-IT
26 posts
15 years ago
Environ-IT's avatar Environ-IT

Ahh thanks, I’ll give that a try. Someone needs to proof read the API documentation, there’s a number of small errors like this.

Thanks again

Andrew

       
Joe Paravisini's avatar
Joe Paravisini
50 posts
15 years ago
Joe Paravisini's avatar Joe Paravisini

yeah, I have found 2 so far just today. It can be a great feeling to realize an error is for once not your own stupidity though, helps balance out the day 😉

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.