Sha256: 5229c541091f754c2e322e5bba7bb4edf9faef4fa7bae65e36cf85c452067801
Contents?: true
Size: 904 Bytes
Versions: 25
Compression:
Stored size: 904 Bytes
Contents
module Cmor module Cms # Usage: # # # app/controllers/application_controller.rb # class ApplicationController < ActionController::Base # view_helper Cmor::Cms::ApplicationViewHelper, as: :cms_helper # end # class ApplicationViewHelper < Rao::ViewHelper::Base def title "#{Cmor::Cms::Configuration.site_title} - #{c.content_for(:title)}" end def meta_description "<meta name=\"description\" content=\"#{c.content_for(:meta_description)}\">" end def link_to_top c.render partial: '/cmor/cms/link_to_top' end def is_page? params[:action] == 'respond' && params.has_key?(:page) end def current_page?(page) cms_page? && params[:page].to_s == page.to_s end def current_page cms_page? ? params[:page].to_s : nil end end end end
Version data entries
25 entries across 25 versions & 1 rubygems