Re-ordering collections alphabetically in the items page

Hi!
I would like to know if someone has a solution for re-ordering collections alphabetically in the adding items page?
We have more than 100 collections and it's very hard to find the right one when we add a new item!

Thanks a lot for your answers.

I have good news and bad news. The bad news is that there isn't really a good way to do that without some fairly deep digging into the core.

The good news is that we've added that change for the next release of Omeka

That's a great news :) Thanks!
When is schedule the next release?

Hi,

For my part, I use a specific filter 'collections_select_options' in a specific plugin (I have one specific plugin by Omeka project for such a thing):


/**
* Manage search options for collections.
*
* @param array Search options for collections.
* @return array Filtered search options for collections.
*/
public function filterCollectionsSelectOptions($options)
{
asort($options);
return $options;
}

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Thanks, Daniel!

We don't have a firm date for releasing Omeka 2.2 yet, but all of the features we plan are done, pending testing.

Thanks for your answers Danie and patrickmjl !

Unfortunately I'm a beginner in programming...can you be more specific with this specific plugin?
Thanks a lot!

Hi,

A specific plugin is a file where all little helpers and miscellaneous hacks can be gathered for a Omeka project. See https://github.com/Daniel-KM/Specific for a very short example based on your issue.

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

Great thanks a lot Daniel!

I have another question...sorry!

Is it possible to have the collection tree in the collection selection when adding a new item? It would be very useful to choose in which collection you should add the item, with the "-" "---" etc.. in front of the sub-collections!

Hi,

I patched the Collection Tree plugin for that (see https://github.com/Daniel-KM/CollectionTree).

If you prefer to use the mainstream plugin, wait for approbation of the patch or update the specific plugin like this:

public function filterCollectionsSelectOptions($options)
{
asort($options);
if (plugin_is_active('CollectionTree')) {
$treeOptions = $this->_db->getTable('CollectionTree')->findPairsForSelectForm();
// Keep only chosen collections, in case another filter removed some.
$options = array_intersect_key($treeOptions, $options);
}
return $options;
}

Sincerely,

Daniel Berthereau
Infodoc & Knowledge management

That's a really great news and works perfectly! Thank you so much for that!