Collection-Specific Tag Cloud

How difficult would it be to display a tag cloud of tags specific to a collection. Right now I can browse items in a collection, but if I browse by tag, I get the tags from the entire archive.

(I'm working on building this site with a FYC class.)

Is there a tag class? Would one loop over the collection, grabbing tags from each item in a collection and adding them to an array of some sort, using tag_cloud to display the cloud?

Any suggestions on how to implement this or (better) whether it is easily implementable would be much appreciated.

yes, there is indeed the tag class

Hi Chris,

There is no built-in way to do this, but you can write a custom query for it. I created a function that filters the tags list based on items in a specific collection. Checkout the gist on my GitHub account. Just include this custom function in your theme's custom.php file, or in a new plugin. Once you include that function somewhere, you'd need to do something like this on your collections/show.php template to use it:

$collectionTags = get_tags_for_items_in_collection();
echo tag_cloud($collectionTags,uri('items/browse'));

We may update Omeka in a future release to allow this kinds of custom queries on tags, but in the meantime I hope this helps you out.