Module: Cortex::Snippets::ViewHelpers
- Defined in:
- lib/cortex/snippets/view_helpers.rb
Instance Method Summary collapse
- #noarchive ⇒ Object
- #nofollow ⇒ Object
- #noimageindex ⇒ Object
- #noindex ⇒ Object
- #noodp ⇒ Object
- #nosnippet ⇒ Object
- #seo_description ⇒ Object
- #seo_title ⇒ Object
- #snippet(options = {}, &block) ⇒ Object
Instance Method Details
#noarchive ⇒ Object
38 39 40 |
# File 'lib/cortex/snippets/view_helpers.rb', line 38 def noarchive webpage[:noarchive] end |
#nofollow ⇒ Object
26 27 28 |
# File 'lib/cortex/snippets/view_helpers.rb', line 26 def nofollow webpage[:nofollow] end |
#noimageindex ⇒ Object
42 43 44 |
# File 'lib/cortex/snippets/view_helpers.rb', line 42 def noimageindex webpage[:noimageindex] end |
#noindex ⇒ Object
22 23 24 |
# File 'lib/cortex/snippets/view_helpers.rb', line 22 def noindex webpage[:noindex] end |
#noodp ⇒ Object
30 31 32 |
# File 'lib/cortex/snippets/view_helpers.rb', line 30 def noodp webpage[:noodp] end |
#nosnippet ⇒ Object
34 35 36 |
# File 'lib/cortex/snippets/view_helpers.rb', line 34 def nosnippet webpage[:nosnippet] end |
#seo_description ⇒ Object
18 19 20 |
# File 'lib/cortex/snippets/view_helpers.rb', line 18 def seo_description webpage[:seo_description] end |
#seo_title ⇒ Object
14 15 16 |
# File 'lib/cortex/snippets/view_helpers.rb', line 14 def seo_title webpage[:seo_title] end |
#snippet(options = {}, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/cortex/snippets/view_helpers.rb', line 4 def snippet( = {}, &block) snippet = webpage[:snippets].find { |snippet| snippet.name == [:id] } if snippet.nil? || snippet.empty? content_tag(:snippet, capture(&block), id: [:id]) else content_tag(:snippet, snippet, id: [:id]) end end |