Module: CommonwealthVlrEngine::Pages

Extended by:
ActiveSupport::Concern
Included in:
PagesController
Defined in:
lib/commonwealth-vlr-engine/pages.rb

Instance Method Summary collapse

Instance Method Details

#aboutObject



20
21
22
# File 'lib/commonwealth-vlr-engine/pages.rb', line 20

def about
  @nav_li_active = 'about'
end

#about_siteObject



24
25
26
# File 'lib/commonwealth-vlr-engine/pages.rb', line 24

def about_site
  @nav_li_active = 'about'
end

#exploreObject



28
29
30
# File 'lib/commonwealth-vlr-engine/pages.rb', line 28

def explore
  @nav_li_active = 'explore'
end

#homeObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/commonwealth-vlr-engine/pages.rb', line 5

def home
  @carousel_slides = CarouselSlide.where(:context=>'root').order(:sequence)
  section_active_count = 0
  sections = ['maps', 'collections', 'institutions', 'formats']
  sections.each do |section|
    if t("blacklight.home.browse.#{section}.enabled")
      section_active_count += 1
    end
  end

  @middle_feature_columns = 12 / section_active_count

  render 'pages/home'
end