Hey all!

I am wondering if there is some way to unlink the categories that are listed below each post? I really would like them to be listed, but it's a problem for the site architecture for them to do this!

I looked through all forum posts and could not find where to do this. I also tried searching for info about $terms and couldn't find what I was looking for.

Is this possible?

Thanks!
:-)

Comments

Mojah’s picture

I cannot provide clear instructions, but might be able to point you in the right direction...how and where your links appear is controlled by the theming components of Drupal. So you will want to start here: http://drupal.org/node/45471 and may be this is what you are looking for http://drupal.org/node/67587.

mosa’s picture

Hey again,

Yes, I forgot to mention I have looked through the php snippets to no avail. The only thing I found was this: http://drupal.org/node/121429 -- and there was not a reply about it.

Your second link looks interesting, I don't understand enough about PHP to see how I can use CSS to strip links. Can anyone else point me in the right direction? Maybe this is my answer but I can't understand it yet!

Thanks for your help.

nevets’s picture

For your theme add the following to your template.php. If you already have a _phptemplate_variables() function you will need to merge this version in. If you do not have a template.php create one and add the code below, in this case you will need a line with <?php at the start.

function _phptemplate_variables($hook, $vars) {
   switch($hook) {
     case 'node' :
        $vars['terms'] = yourthemename_unliinked_terms($vars['node']->taxonomy);
       break;
   }
   return $vars;
}

function yourthemename_unliinked_terms($taxonomy) {
	$term_separator = ' ';  // What ever you want to taxonomy terms separated by
	$terms = array();
	foreach ($taxonomy as $term) {
		$terms[] = $term->name;
	}
	return implode($term_separator, $terms);
}
mosa’s picture

it worked great. I wasn't sure if it matters that unlinked was spelled with two ii's, so I corrected those two occurrences. i had almost lost hope, but checked back and this was exactly what i needed.

thanks again, you made my day! :-)