blacklight
blacklight copied to clipboard
Add a configuration option for home page facets
Several institutions have a limited set of facets that appear on their home page (primarily because of performance issues). Add an option in the catalog controller to set which facets will appear on the homepage (default all).
I believe this could be handled with something like this:
config.add_facet_field 'format_facet', if: Proc.new {|context, _config, _opts| context.current_page?(main_app.root_path) }
We also touch on some approaches in the customizing blacklight workshop:
https://workshop.projectblacklight.org/v8.0.0.alpha/extending-catalog-controller/ https://workshop.projectblacklight.org/v8.0.0.alpha/dynamic-catalog-configuration-using-before_actions/