Module: EtabliocmsCore::ApplicationHelper
- Includes:
- OutputHelper
- Defined in:
- app/helpers/etabliocms_core/application_helper.rb
Instance Method Summary
collapse
#html_out, #sanitized, #truncate_and_strip_tags, #truncate_and_strip_tags_from_textile, #truncate_words, #w3c_date
Instance Method Details
#add_breadcrumb(title, url = nil) ⇒ Object
9
10
11
|
# File 'app/helpers/etabliocms_core/application_helper.rb', line 9
def add_breadcrumb(title, url = nil)
@breadcrumbs << OpenStruct.new(:title => title, :url => url)
end
|
#body_class ⇒ Object
27
28
29
30
|
# File 'app/helpers/etabliocms_core/application_helper.rb', line 27
def body_class
qualified_controller_name = controller.controller_path.gsub('/', '-')
"#{qualified_controller_name} #{qualified_controller_name}-#{controller.action_name}"
end
|
#set_description(page_description) ⇒ Object
23
24
25
|
# File 'app/helpers/etabliocms_core/application_helper.rb', line 23
def set_description(page_description)
content_for(:description) { page_description }
end
|
#set_title(page_title) ⇒ Object
19
20
21
|
# File 'app/helpers/etabliocms_core/application_helper.rb', line 19
def set_title(page_title)
content_for(:title) { page_title }
end
|
#set_title_and_breadcrumb(title, breadcrumb_text = nil, url = nil) ⇒ Object
13
14
15
16
17
|
# File 'app/helpers/etabliocms_core/application_helper.rb', line 13
def set_title_and_breadcrumb(title, breadcrumb_text = nil, url = nil)
set_title title
breadcrumb_text ||= title
add_breadcrumb breadcrumb_text, url
end
|