Problem/Motivation

With #1282444: Support microdata for taxonomy_term, support was added for microdata output on Taxonomy Term Reference fields. However, the information such as the term description is currently not exposed in microdata because no microdata is output for the term on the term's page display.

Proposed resolution

Possibly add microdata_preprocess_taxonomy_term. RDF uses the following:

/**
 * Implements MODULE_preprocess_HOOK().
 */
function rdf_preprocess_taxonomy_term(&$variables) {
  // Adds the RDF type of the term and the term name in a <meta> tag.
  $term = $variables['term'];
  $term_label_meta = array(
      '#tag' => 'meta',
      '#attributes' => array(
        'about' => url('taxonomy/term/' . $term->tid),
        'typeof' => $term->rdf_mapping['rdftype'],
        'property' => $term->rdf_mapping['name']['predicates'],
        'content' => $term->name,
      ),
    );
  drupal_add_html_head($term_label_meta, 'rdf_term_label');
}

Comments

Anonymous’s picture

Issue tags: -Novice +1.0 blocker

This should be resolved before RC.