Module: Shakespeare::ViewHelpers
- Defined in:
- lib/shakespeare/view_helpers.rb
Instance Method Summary collapse
- #canonical_link_tag ⇒ Object
- #description_meta_tag ⇒ Object
- #keywords_meta_tag ⇒ Object
- #page_title ⇒ Object
- #robots_meta_tag ⇒ Object
Instance Method Details
#canonical_link_tag ⇒ Object
23 24 25 26 27 |
# File 'lib/shakespeare/view_helpers.rb', line 23 def canonical_link_tag return if page_content.nil? or page_content.canonical.blank? return unless page_content.enable_canonical? %Q[<link href="#{page_content.canonical}" rel="canonical" />] end |
#description_meta_tag ⇒ Object
8 9 10 11 |
# File 'lib/shakespeare/view_helpers.rb', line 8 def return if page_content.nil? or page_content.description.blank? %Q[<meta name="description" content="#{page_content.description}">] end |
#keywords_meta_tag ⇒ Object
13 14 15 16 |
# File 'lib/shakespeare/view_helpers.rb', line 13 def return if page_content.nil? or page_content.keywords.blank? %Q[<meta name="keywords" content="#{page_content.keywords}">] end |
#page_title ⇒ Object
3 4 5 6 |
# File 'lib/shakespeare/view_helpers.rb', line 3 def page_title return if page_content.nil? or page_content.title.blank? page_content.title end |
#robots_meta_tag ⇒ Object
18 19 20 21 |
# File 'lib/shakespeare/view_helpers.rb', line 18 def return if page_content.nil? or page_content.robots.blank? %Q[<meta name="robots" content="#{page_content.robots}">] end |