Hi,
I use nodewords on my taxonomy term pages, and indeed it shows some values, but the values are on every termpage the same, "the vocabulary name and sitename" and NOT the termname or information on related terms.

I would expect on a taxonomy/term page from the subterm "Wintersport" with parentterm "Holidays", that the METATAG DESCRIPTION shows something like:

<meta name="description" content="wintersport holidays" />

But instead it outputs only the vocabulary name and sitename:

<meta name="description" content="category sitename" />

And this METATAG DESCRIPTION is outputted on every taxonomy/term page exactly the same, so no difference.

My usecase is a taxonomy/term overriden situation using ctools/panels taxonomy/term systempage.

Thanks a lot for going into this in advance and a great 2010 to you!
Greetings,
Martijn

Comments

summit’s picture

Hi, googling I found the following page related to views: http://janaksingh.com/blog/adding-meta-tags-taxonomyterm-override-view-p...
On it there is code to hijack the hook_views_pre_render function:

<?php
function mymodule_views_pre_render(&$view) {
  // get the right view, make sure the name matches you view name
  if($view->name == 'taxonomy_term'){ 
    foreach ($view->display as $display) {
      // We're only interested in main page views if it has arguments.     
      if (drupal_substr($display->id, 0, 5)  == 'page' and !empty($view->args)) {
        $term_obj = taxonomy_get_term($view->args[0]);   
        if($term_obj){ // do we have a term obj
          drupal_set_html_head(nodewords_output_tags(nodewords_get(array('term', array($term_obj->tid)))));
        }
      }
    }
  }
}
?>

Could this have to do with it? Off course the ctools/panels overriding taxonomy/term page uses the taxonomy/term view...

Greetings, Martijn

avpaderno’s picture

Title: METATAGS DESCRIPTION on Taxonomy/term pages through ctools/panels override only give: "vocabulary name and sitename" » Metatag DESCRIPTION on taxonomy/term pages through ctools/panels override only give: "vocabulary name and sitename"

The code you reported in comment #1 would not even work with the last versions of Nodewords, because there isn't anymore the function nodewords_get().

About the other question, if you don't set any value for the meta tag DESCRIPTION, the code uses the term, or the vocabulary description.

    case NODEWORDS_TYPE_TERM:
      $bool = (
        empty($content['value']) &&
        count($options['ids']) == 1 &&
        ($term = nodewords_get_term($options['ids'][0]))
      );

      if ($bool) {
        $content['value'] = $term->description;
      }
      break;

    case NODEWORDS_TYPE_VOCABULARY:
      // TODO: probably we have to do a db_rewrite_sql() query here so access is restricted
      $bool = (
        empty($content['value']) &&
        count($options['ids']) == 1 &&
        ($voc = taxonomy_vocabulary_load($options['ids'][0]))
      );

      if ($bool) {
        $content['value'] = $voc->description;
      }
      break;
summit’s picture

Title: Metatag DESCRIPTION on taxonomy/term pages through ctools/panels override only give: "vocabulary name and sitename" » METATAGS DESCRIPTION on Taxonomy/term pages through ctools/panels override only give: "vocabulary name and sitename"

Hi,
Off course I am talking about auto keywords vocabularies usage.
greetings, Martijn

avpaderno’s picture

Title: METATAGS DESCRIPTION on Taxonomy/term pages through ctools/panels override only give: "vocabulary name and sitename" » Meta tag DESCRIPTION on taxonomy/term pages through ctools/panels override only give: "vocabulary name and sitename"
avpaderno’s picture

summit’s picture

Hi, thanks for your remarks.
So is now Meta Tag Description as such that on the taxonomy/term pages the term and possible parent term can be shown automatically? And than user altered if wanted?
Now the vocabuary Meta Tag description is shown on all taxonomy terms, or do I have to wait for 6.12 for this?

Thanks for your quick reply!
Greetings, Martijn

avpaderno’s picture

The module uses the taxonomy term / vocabulary description if you don't enter any value for the meta tag DESCRIPTION; it doesn't use the parent description.

Version 6.x-1.11 (as any other official versions) cannot be changed, once released. It is only possible to create a new release, which means a new official version, or a new release of a development snapshot. In any cases, the development snapshot is the first to be released, as it is the version used to create an official version; the release cycle follows this schema: 6.x-1.11 -> 6.x-1.x-dev -> 6.x-1.12 -> 6.x-1.x-dev -> 6.x-1.13 (instead of 6.x-1.12, it could be created version 6.x-1.12-beta1; in that case, the cycle is repeated until version 6.x-1.12 is created).

avpaderno’s picture

Off course I am talking about auto keywords vocabularies usage.

Auto keywords vocabularies are used only with nodes; they are not used with other pages.

avpaderno’s picture

Status: Active » Fixed

I am marking this support request as fixed because it has gotten an answer.

summit’s picture

Status: Fixed » Active

Hi, then this addon question to have two options for meta tags on taxonomy term pages:
1) have the taxonomy/term pages holding all terms which all nodes on the page have. Starting keyword and description with the taxonomy term itself and for description before the last one 'and' instead of ','.
2) show these on the meta tags field with user possibility to override them, the same as default can be overriden.
Thanks for considering this, this would help give taxonomy/term pages more uniqueness.
Greetings, Martijn

avpaderno’s picture

Status: Active » Fixed

For a feature request open a new report, explaining in detail what you would like to see implemented.

For what I understand of the request, the code does not handle more than one object; in example, it cannot handle the meta tags of more than one taxonomy term, and it is not clear what the code should do with meta tags such as REVISIT-AFTER.
Keywords are separated by a comma, and it is not clear to me in which way replacing the last comma with AND would increase the uniqueness.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.