Sha256: adbafc21a5f4cd388846dfe6073c42e5c13be34a2c8ceab6bafa729b1cae0c10

Contents?: true

Size: 1.43 KB

Versions: 1

Compression:

Stored size: 1.43 KB

Contents

- obj ||= nil
- unless obj.nil?

  - _cache_helper = (Hancock::Seo.config.cache_support ? :hancock_cache : :cache)
  - send _cache_helper,  [obj, @seo_page].uniq do
    .text_content
      - seo = obj.seo
      - if (!defined?(h1) || h1) && seo and !seo.h1.blank?
        h1= seo.h1
        
      - if obj.content.blank?
        - unless @seo_page.nil?
          == @seo_page.page_content(self) rescue @seo_page.page_content
      - else
        - if defined?(Hancock::Pages::Page) and obj.is_a?(Hancock::Pages::Page)
          == obj.page_content(self) rescue obj.page_content
        - else
          - if obj.respond_to?(:page_content)
            == obj.page_content rescue obj.content
          - else
            == obj.content
    
  = render 'blocks/seo_block_with_obj', obj: obj
      
  / = render 'shared/admin_link', obj: obj
  / - if !@seo_page.nil? && (@seo_page.id != obj.id || @seo_page.class.name != obj.class.name)
  /   = render 'shared/admin_link', obj: @seo_page

  / - content_for :meta do
  /   - send _cache_helper,  [obj, 'meta'] do
  /     = render 'shared/meta', obj: obj, alt_obj: @seo_page
  /     - og_title = (obj.get_og_title.blank? and @seo_page ? @seo_page.get_og_title  : obj.get_og_title)
  /     - og_image = (obj.og_image.blank?     and @seo_page ? @seo_page.og_image      : obj.og_image)
  /     = render 'shared/og', title: _og_title, image: _og_image
  / 
  / - content_for :title do
  /   - if obj.title
  /     = obj.title

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hancock_cms_seo-1.0.2 app/views/shared/_obj_with_seo.html.slim