I'm trying to add a simple class to a link outputted via print render($content['field_tags'])
. I'm using the Bootstrap theme. These are the approaches I've tried so far:
- Hooking into template_preprocess_node - no luck here as the html isn't generated yet.
- Hooking into template_field - this contains exactly what I expect but the links being generated don't obey the classes set here.
- Hacking node.tpl.php and manually outputting the terms - this sort of works but it's not the best solution.
This is the output as it is at the moment:
<a href="/tags/drupal" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">drupal</a>
I don't want to add any more modules as there has to be a code solution to this, I'm not sure what I'm missing here. How do I add a class to link outputted in field_tags?