This is a coding question,

I want to select a branch of the taxonomy, not the actual nodes necessarily, although that would be nice. I only need the tid's, as a tree. So for example, if the taxonomy categories are like

People
Nurses
OnStaff
Contractors
FormerlyEmployed
Doctors
OnStaff
Retired

I want to get a hash like:

$people array(
'14' => array (
'2',
'5',
'3',
)
'61' => array(
'9',
'4,'
)
)

Where the numbers are tid's.

I could do it myself with joins of the term_data and vocabulary tables but I'm hoping there's already an established Drupal Way.

Comments

Rotwang’s picture

People
  Nurses
    OnStaff 
    Contractors
    FormerlyEmployed
  Doctors
    OnStaff
    Retired

I want to get a hash like:

$people array(
  '14' => array (
    '2',
    '5',
    '3',
  )
  '61' => array(
    '9',
    '4,'
  )
)