I would like to list categories used in my website taxonomy without having displayed the number of posts in them.
The actual display is :
- term 1 (n)
- term 2 (n)

I'd like to display:
- term 1
- term 2

Comments

cantastorie’s picture

Sorry to be insistent. Could anyone help me?

Aress’s picture

I think you can modify in taxonomy.module line 109 (drupal 4.5.2):

$items[] = l($category->name .' ('. $category->count .')', 'taxonomy/term/'. $category->tid) .'
'. t('%time ago', array('%time' => format_interval(time() - $category->updated)));

to

$items[] = l($category->name , 'taxonomy/term/'. $category->tid) .'
'. t('%time ago', array('%time' => format_interval(time() - $category->updated)));

but maybe there are simpler solutions.
Cheers, Mike

sepeck’s picture

This can probably be modified within the theme itself rather than modifying the taxonomy module.

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Mateo’s picture

Are you using phptemplate? Also, can you give a direct example of the problem? (a link perhaps)

Mateo

cantastorie’s picture

Yes, I'm using phptemplate.
These are some examples:

http://www.semioticamente.it/versus/?q=article/numeri+della+rivista

http://www.semioticamente.it/versus/?q=article/autore

However I'm really grateful for your aid.
I'll try the patch as soon as the 4.6 will be released and I'll set up a test site.
Riccardo

Mateo’s picture

Try putting the following function in your template.php file (located in your template directory). It will override the default function.

function phptemplate_article_index_item(&$term) {
  $description = ($term->description != "") ? "<p class=\"article-desc\">". $term->description ."</p>" : "";
  if ($term->count > 0) {
    return "<li ><div class=\"article-title\">". l($term->name, $term->link) ."</div>". $description.$term->children ."</li>";
  }
  else {
    return "<li><div class=\"article-title\">". $term->name ."</div>". $description.$term->children ."</li>";
  }
}

It will override the theme_article_index_item function. Let me know if it works.

If you need help inserting the function into the template.php file, search drupal for "template.php"

Mateo

cantastorie’s picture

It has worked. I'll post eventual side effects.
Many thanks to all.

kbahey’s picture

Do you want a page or block with all the taxonomy terms listed?

You can look at the sitemenu module in the download page and maybe it is what you want.

--
Consulting: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

Reginleif’s picture

.... so that it looks just like the list of "categories" at http://www.frazierhome.net

Edit: got it. It appears that Taxonomy DHTML does exactly what I want. All fixed. :)