I was wondering about the best way to add links for "Browse by Creator" and "Browse by Subject" to the /omeka/items/browse page?
I have already figured out that these links are created as an array in the function for "public_nav_items" (globals.php). How would I go about actually adding the pages corresponding to these links though (eg.: /omeka/items/creators)?
My goal is to offer link-lists of the 50 most commonly used creators and subjects.
Thanks for your help everyone!
To get at what you want, you would need to make a plugin that adds those pages.
Pages like that similar to the browse by tags page will be pretty tricky, though, since Omeka isn't really built for querying directly for metadata values to make lists like that. I _think_ it is possible, but I'm not sure exactly how off the top of my head.
If you just want lists and not a word cloud, you could probably accomplish this with a custom shortcode that takes
element_id as a parameter, then uses a prepared statement to query the
element_texts table by the id (e.g. 39 for Creator), count the unique values, and construct links to browse pages from the 50 greatest values.
So the query would look like:
SELECT text,COUNT(*) as count FROM element_texts WHERE element_id=39 GROUP BY name ORDER BY count DESC;
And the shortcode would be something like
See the developer docs for more info on writing plugins for custom shortcodes.
Thank Patrickmj and sheepeeh for your input on this. I will have to do some more research on the shortcoding possibilites of Omeka.
I found something on GitHub, which seems similiar to what I am trying to achieve: MetadataBrowser (https://github.com/kevinreiss/Omeka-MetadataBrowser)
Maybe I can use this a guide...
Again, thanks guys...
It looks like that plugin is a bit out of date, and won't work for the Omeka 2 series, which is what you should be (and probably are) on.
Thank you all for this interesting discussion that helped me in rapidly coding the ElementIndex plugin : https://github.com/pcouchet/ElementIndex
But, it would be an advantage of have a list of sorted words/entries instead of cloud for a search made easy.