Hello,
Is it possible with this (or other) module to customise node type counts ? Not like in total: Published Nodes: xxx but something like:

1. CATS (node type) : 23
2. DOGS (node type): 12

Thanks

Comments

Anonymous’s picture

Status: Active » Fixed
  // for Drupal 5
   $node_types = node_get_types('names');
{
    $count = db_result(db_query("SELECT COUNT(*) FROM {node} WHERE type = 'CAT'", $type));
    $count2 = db_result(db_query("SELECT COUNT(*) FROM {node} WHERE type = 'DOG'", $type));
    print("<ul><li>CATS: $count</li><li>DOGS: $count2</li></ul>\n");
  }

----------------------------------------------------

you don't need the count module to do this, its just a blurb of code you can use in a block, page, etc that will show something like:
-CATS: 23
-DOGS: 12

assuming "cat" and "dog" are the node type names.

hope that helps!

-Ribbie
mvdconline.com

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.