On 5/31/2012 5:59 AM, David Golding wrote:
I'm getting the results of term->children() not sorted. I can't seem to
get my children nicely ordered the same as get_tree($orderby= 'mptt_left
ASC')
Am I missing something obvious?

In your example, $term_ob->children() returns an array. If you want to call ->tree_sort() on the result, then it needs to be an instance of Terms. You can do that like this:

$children = new Terms($term_ob->children());

I'm not sure why it doesn't already return Terms, so I'll likely make that change today. Besides that, I can't think of a reason why it should return the terms out of order to begin with - at any level - so I'll see if I can have both get_root_terms() and children() return their results in tree order.

Owen

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/habari-dev

Reply via email to