I recently worked on a project in Drupal that called for a large number of taxonomy terms. I needed to put the terms in a specific order, but unfortunately, I had more terms than Drupal's weight field supports, which is a range from -10 to +10.
I did a quick search on Drupal, and was horrified to see how many people are hacking core to add a greater range. This is pretty easy to do without hacking core. All you need to do is create your own module that implements hook_form_alter().
my_module.module
<?php
function my_module_form_alter($form_id, &$form) {
switch($form_id) {
case 'taxonomy_form_term':
$form['weight']['#delta'] = 100;
break;
}
}
?>And that's it!
[tags]alter, drupal, form, hook, module, taxonomy, term, weight[/tags]
Drupal 5 or 6
Submitted by Anonymous on Tue, 07/26/2011 - 22:55.I tried this as a d6 module. The modules page says that the module is incompatible with 6.2
Is this designed as a d5 module - how would it need to be updated for d6?
I have a big 800 word vocab list that needs to be weighted and/or displayed hierarchically with $terms
there are few if any d6 solutions for this in contrib modules
there is a core patch > but never patch core is the mantra