views:

146

answers:

1

by default, when you create a content which has a taxonomy, drupal will show a select list with all term showed up.

i just want to know, which built in function the drupal 6 used to build that select list.

+2  A: 

taxonomy.module:
hook function for modifying node adding/editing form:
function taxonomy_form_alter(&$form, $form_state, $form_id) {
list of associated with current node type vocabularies are from query:
$c = db_query(db_rewrite_sql("SELECT v.* FROM {vocabulary} v INNER JOIN {vocabulary_node_types} n ON v.vid = n.vid WHERE n.type = '%s' ORDER BY v.weight, v.name", 'v', 'vid'), $node->type);
after this, for all vocabs, terms editing element building _taxonomy_term_select will called,
that call drupal.api function for getting datas about terms of current vocabulary:
http://api.drupal.org/api/function/taxonomy_get_tree/6

See all function for taxonomy here: http://api.drupal.org/api/search/6/taxonomy

Nikit

related questions