Time again for Drupal 101 "I thought I knew how to do this, but I guess not" newbie-ness.

Nodes and node listings display a horizontal list of the node's terminology terms (following the "Submitted by..." text, or wherever the theme dictates).

Editing the PHP code is one way to turn off those links, but isn't there a way within the Drupal settings? I thought there was, but poking around user settings, content types settings, theme settings, and so on is turning up nothing...

The answer may be a simple "no, you can't". Sorry to ask what must have been asked many times before, but a forum search for "hide term links" and similar attempts isn't getting me anywhere.

Thank you!

Comments

OpenChimp’s picture

It would be nice if that were in the adminisitrations screens, but the only way that I know of is to edit the theme functions and files for the appropriate displays.

keenan83’s picture

I also would like to know if there is another way of doing this without altering the code myself.

jastraat’s picture

I don't know a way to change the display of terms through the Drupal interface, but you can hide them very simply in the theme either using CSS or making a tiny alteration to the node.tpl.php file. If you're working from the Garland theme, make a copy of the theme, place it in your sites/all/themes folder and rename it. If you already are using a contributed or customized theme, you can just edit that. The code that creates the term links is in the node.tpl.php file. Comment out the following lines as demonstrated below:

<!--
<?php if ($taxonomy): ?>
      <div class="terms"><?php print $terms ?></div>
<?php endif;?>
-->

Alternatively, you can edit the style.css file and add the following:

.terms {
    display: none;
}
Drupalace-1’s picture

jastraat, that looks like a great – and simple – solution. An admin-based solution would be an ideal addition to Drupal in the future, but for now, I appreciate the CSS how-to. Thanks!

--------
One Drupal non-guru's slow road to enlightenment: http://www.drupalace.com

morty-1’s picture

Yes, this should really be possible to configure through the administration interface.

Anonymous’s picture

That worked very well for me.
Thanks.
Michaël

steveoliver’s picture

Create a new block (Input format: Full HTML) with the following code:

<style type="text/css">
<!--
.terms { display:none; }
-->
</style>


Advantages:

  1. You don't have to hack a theme (in case it is shared with other sites in a multisite environment.
  2. You can enable/disable the terms-hiding css code on any node or section of your site.

--
Steve Oliver
Circatree Design
www.circatreedesign.com

sandspyderx’s picture

Hi

Maybe using the taxonomy hide module helps:

http://drupal.org/project/taxonomy_hide

regards from Namibia

ryo’s picture

rlnorthcutt’s picture

Simple... elegant... and flexible!

I just added this as a block to a client site where they are using a shared theme, so editing the theme is not gonna happen. I was about to just whip up a tiny module when I saw this.

Best part is - I have set the block to show up for all but the admin role, so the admins still get to use the taxonomy links to navigate...

Thanks!
Ron

regards,
Ron Northcutt
Directory of Technical Marketing, Acquia