We could add similar code to check for an instance variable like @search_preset defined in the controller alongside other search preset code. Then we could call a separate helper method prefixed with this search preset name for custom sorting as well.
This isn't an urgent need, but a place to outline how to build such a feature if/when we need it.
Currently the sort helper code checks if rendering a page for a Section: https://github.com/CDRH/orchid/blob/dev/app/helpers/orchid/sort_helper.rb#L49 If there is a section in use, it will call a separate helper method prefixed with the section name for custom sorting.
We could add similar code to check for an instance variable like
@search_preset
defined in the controller alongside other search preset code. Then we could call a separate helper method prefixed with this search preset name for custom sorting as well.This isn't an urgent need, but a place to outline how to build such a feature if/when we need it.