Item browse default setting


#1

Unless I’m missing it, there is no way currently to set the default browse sort order. I remember there was a plugin for it in Omeka Classic.

I checked the Omeka-S settings as well as site settings and theme settings, but didn’t find anything in the UI. Also checked the application files like in /config but didn’t find a setting there.

After some grepping and exploring, I found the setting hardcoded into /application/src/Controller/Site/ItemController.php

    public function browseAction()
    {
        $site = $this->currentSite();

        $this->setBrowseDefaults('dcterms:date');

I was able to successfully modify it.

Is there any way to modify this per site without resorting to a plugin? Perhaps I could add a PHP function within the theme associated with this particular site (not root in my case)? I don’t need it to apply to every site at the moment, and of course I don’t prefer to modify the core application code :slight_smile:


#2

The “typical” method of setting default browse orders in Classic was to just include ordering parameters in the link in the navigation.