In the 4.4 version, context information (description of current term, list of first-level child terms) is displayed via a call to drupal_set_message(). While it more or less works, this is really a misuse of the message display, and causes theme-specific problems since themes may display their messages differently.
Ideally, there would be a way to modify the display of term pages. I've submitted this issue, including a proposed patch to taxonomy.module, to try to address this. If the patch is accepted, it will introduce a new option in the _taxonomy hook that will enable insertion of content. Then then taxonomy_context could display context through a call like:
function taxonomy_context_taxonomy ($op, $type, $object) {
switch($op) {
case 'view':
if (($type == 'term') && is_array($object) && (count($object) == 1)) {
return function taxonomy_context_show();
}
break;
}
}
This would require changes elsewhere, e.g., making taxonomy_context_show return content, eliminating the function taxonomy_context_link.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | tc_taxonomy_view.patch | 3.01 KB | LacKac |
Comments
Comment #1
LacKac commentedI've made the necessary changes. I'm using the patch for taxonomy.module suggested by you.
The attached patch is for my version of taxonomy_context.
Comment #2
LacKac commentedI've made the necessary changes. I'm using the patch for taxonomy.module suggested by you.
The attached patch is for my version of taxonomy_context.
Comment #3
mhutch commentedPlease get this in for 4.5! The current drupal_set_message() system can looke horrible unless the theme especially supports taxonomy_context - I had to patch my theme to detect the message type...
Comment #4
LacKac commentedI discovered another problem too with the present output of terms and subterms. It is not really themeable, because theme('taxonomy_context_term', ...) is invoked in the init hook, where the theme system doesn't know the name of the theme yet.
It would be really great if that new 'view' option got into the taxonomy hook.
Comment #5
nancydruReopen this with a current release if it is still valid.