CGBlog UDT get Child categories / ECB

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

CGBlog UDT get Child categories / ECB

Post by naturelab »

I have a UDT that returns an array of CGblog categories. This is then used to populate an ECB multiselect dropdown.

UDT - name = "categories"

Code: Select all

cms_utils::get_module('CGBlog');
$blogcategories = cgblog_ops::get_category_list(FALSE,null,FALSE);
$catarray = array_combine($blogcategories, $blogcategories);
return $catarray;
I then use the ECB module to populate a multiselect dropdown.

Code: Select all

{content_module module="ECB" field="dropdown_from_udt" block="tagselect" label="Select tags" udt='categories'  size="50" multiple="true" assign='tagselect' tab='Tags'}
This works well, ( although there is a separate issue with the ECB multiselect, it does not retain the highlight selection when you go back to the page ).

What I would like to do, is make a similar UDT but to ONLY pull out CHILDREN of a specific catgeories.


ie:-
1) Get CGBlog categories
2) Find specific category
3) Return array of ONLY the children of this specific category

Code: Select all

$blogcategories
looks something like this...
[id] => 85
[name] => blah
[parent_id] => -1 [item_order] => 87
[hierarchy] => 00087
[long_name] => blah
[description] =>
[depth] => 1


Any help greatly appreciated

Thankyou
Post Reply

Return to “Modules/Add-Ons”