Module: SeoHelper::ControllerHelper

Defined in:
lib/seo_helper/helper.rb

Instance Method Summary collapse

Instance Method Details

#set_page_description(description) ⇒ Object



84
85
86
# File 'lib/seo_helper/helper.rb', line 84

def set_page_description(description)
  @page_description = description
end

#set_page_image(image_src) ⇒ Object



92
93
94
# File 'lib/seo_helper/helper.rb', line 92

def set_page_image(image_src)
  @page_image = image_src
end

#set_page_keywords(keywords) ⇒ Object



88
89
90
# File 'lib/seo_helper/helper.rb', line 88

def set_page_keywords(keywords)
  @page_keywords = keywords
end

#set_page_title(title) ⇒ Object

will also append current page number and the site name



75
76
77
78
79
80
81
82
# File 'lib/seo_helper/helper.rb', line 75

def set_page_title(title)
  if params[:page]
    @page_title = SeoHelper.format_current_page(title, params[:page])
  else
    @page_title = title
  end
  @page_title = SeoHelper.format_site_name(@page_title, SeoHelper.configuration.site_name)
end