I am looking to hide the taxonomy terms from my teasers. I am fine with them showing up in the node, but they make make my teasers awfully long. I am using the Zen theme.

I know I can hide them by playing with the node.tpl.php file, but that hides them everywhere.

Any ideas?

Comments

you're on the right track

Try this. Find the following line in node.tpl.php

<?php if (count($taxonomy)): ?>

and change it to:

<?php if (count($taxonomy) && !$teaser): ?>

provided you haven't created other .tpl files that override this, it should work.

Same problem

I had the exact same problem but using the danger4k theme; I couldn't find the line above in my nod.tpl but I found this

?php if ($submitted or $has_terms): ?>

<?php
if ($has_terms) :
?>

<?php
print $terms
?>

which I substituted with

<?php
if (($submitted or $has_terms) && !$teaser) :
?>

<?php
if (($has_terms) && !$teaser):
?>

<?php
print $terms
?>

adding && !$teaser one by one, strating from the last; In Firefox the taxonomy terms disappeared immediatley, in Opera, IE7, Chrome and Safari they didn't...
Why????
Thanks Claudia www.setificio.com

Miraculously

After fiddling around and getting a (scary) parsing error, I reloaded the old node.tpl. remodified it, republished it and now it works in all browsers!
Claudia

subscribe

subscribe

http://basicmagic.net
drupal samurai for hire
buffalo, new york usa