Module: Spotlight::BrowseHelper

Includes:
BlacklightConfigurationHelper
Defined in:
app/helpers/spotlight/browse_helper.rb

Overview

Helper for browse views

Instance Method Summary collapse

Instance Method Details

#default_document_index_view_typeObject

Override Blacklight’s #default_document_index_view_type helper to use a different default view when presenting browse categories



17
18
19
20
21
22
23
# File 'app/helpers/spotlight/browse_helper.rb', line 17

def default_document_index_view_type
  if view_available? default_browse_index_view_type
    default_browse_index_view_type
  else
    super
  end
end

#document_index_view_typeObject



6
7
8
9
10
11
12
# File 'app/helpers/spotlight/browse_helper.rb', line 6

def document_index_view_type
  if @search && @search.default_index_view_type.present? && params[:view].blank?
    blacklight_config.view[@search.default_index_view_type].key
  else
    super
  end
end