Active
Project:
Sky
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
28 Mar 2011 at 10:47 UTC
Updated:
28 Mar 2011 at 10:59 UTC
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
Comment #1
Jeff Burnz commentedOK lets do this, nice improvement.