if you use Taxonomy Redirect module, or use different taxonomy paths than taxonomy/term/termid
then it won't work for taxonomy pages.

the problem I think it is in line 339

 elseif (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2)) && module_exists('taxonomy')) {
    $term = taxonomy_get_term(arg(2));
    if (variable_get('page_title_vocab_'. $term->vid .'_showfield', 0) && ($term_title = page_title_load_title($term->tid, 'term'))) {
      $title = $term_title;
    }

maybe you need to use the taxonomy_term_path function before? http://api.drupal.org/api/function/taxonomy_term_path/6

Comments

nicholasthompson’s picture

Status: Active » Closed (works as designed)

That wont work - Taxonomy Term Path will only function if you pass it a term object. You can only get the term object by loading from a Term ID. You can only get the Term ID if you know where the ID is in the URL at which point we're back to square 1 because we dont know the URL structure, we can only assume its taxonomy/term/[tid].

The latest releases of Page Title come with two hooks... hook_page_title_alter and hook_page_title_pattern_alter. I will be writing up some documentation for these soon. Between these two hooks you can write your own small module which will allow you to modify the page title value (ie, what goes in the [page-title] token) and the page title pattern for any given URL pattern or "rule" you chose.

hedac’s picture

I understand.
I don't know how "taxonomy redirect" does it but it really alters the taxonomy paths internally and it knows the term id when you see that new page with different path.
Those page title hooks seem a good option