Hi,

When a taxonomy field is displayed in a node view (p.e. url mysite.ccom/node/14) or in the teasers (p.e. mysite.com/blog) can be added the rel-tag microformat (http://microformats.org/wiki/rel-tag).

I paste a code modifcation that work so good for me. Also I think that can help other people or be included in the project.

In the file sky/templates/field--taxonomy-term-reference.tpl.php add an instruction in the foreach statment, should looks like:

  <span class="field-items"<?php print $content_attributes; ?>>
    <?php $num_fields = count($items); ?>
    <?php $i = 1; ?>
    <?php foreach ($items as $delta => $item) : ?>
      <?php $item['#options']['attributes']['rel'] = "tag" ?>  /* Added line */
      <?php print drupal_render($item); ?><?php $i != $num_fields ? print ', ' : ''; ?>
      <?php $i++; ?>
    <?php endforeach; ?>
  </span>

I hope it help others like others help me

bye

Comments

Jeff Burnz’s picture

Version: 7.x-1.6 » 7.x-1.x-dev
Assigned: Unassigned » Jeff Burnz
Category: feature » task

OK lets do this, nice improvement.