Collections drop-down

Hi all, I’d like our theme to present a drop-down box that lists all our collections so that users can limit searches to a specific collection. I’m using the solrsearch plugin, so I already know how to make this work with the search-I just need to figure out how to get a list of the names of all our collections, so that I can construct the drop-down. So far, the only way I can see to do that is to use _db->getTable to pull the metadata table and then run a query using _db->select for collection titles, then iterate over them. Am I on the right track or is there an easier way to get such a list? This needs to work from within any view-this is for the search widget that appears on every page. thanks!

There’s a function get_table_options designed just to get lists of ID->label pairs out of tables for making HTML select boxes. That may be the simplest route to what you’re looking for.

Thank you-that was exactly what I needed.