Adding total of items at each collection in Browse Collections

Dear friends.

I want to add total of items at each collection in Browse Collections.

for example,

Library Science (203)
Social science (345)
etc.

I need the help to solve my problem.
Thanks you

In your theme, look for a browse.php file in the collections folder. If it is not already there, follow this guide to copy the default file.

In the collections/browse.php file, look for this line

<h2><?php echo link_to_collection(); ?></h2>

and replace it with these :

<?php $collectionName = metadata($collection, array('Dublin Core', 'Title')); ?>
<?php $count = metadata($collection, 'total_items'); ?>
<h2><?php echo link_to_collection("$collectionName ($count)"); ?></h2>

Thank you very much for the solve.

I use the plugin Collection Tree. Please, I want to add total of items at each collection in Browse Collections Tree.

How is the way ?

Thank you.

These threads should have what you need

* http://omeka.org/forums/topic/collection-tree-item-count-and-description

* http://omeka.org/forums/topic/add-item-count-int-collection-tree#post-112976

The first one has a solution at the bottom. The second is a little follow-up discussion sorting out some details for another developer.