Class: Www::SupportArticlePresenter

Inherits:
BasePresenter
  • Object
show all
Defined in:
app/presenters/www/support_article_presenter.rb

Instance Method Summary collapse

Instance Method Details



21
22
23
24
25
26
27
28
# File 'app/presenters/www/support_article_presenter.rb', line 21

def breadcrumb(pl: nil)
  bcs = [{ name: 'Product Support', url: h.cms_link('/support') }]
  if (apl = pl || article.product_lines.first)
    bcs += h.catalog_breadcrumb_links(apl, section: :support)
  end
  bcs << { name: article.subject.to_s }
  h.formatted_breadcrumb bcs
end

#cache_keyObject



5
6
7
# File 'app/presenters/www/support_article_presenter.rb', line 5

def cache_key
  "#{I18n.locale}/#{article.cache_key}"
end

#og_imageObject



13
14
15
# File 'app/presenters/www/support_article_presenter.rb', line 13

def og_image
  # product_line&.primary_image&.image_url || DEFAULT_SOCIAL_ICON
end

#page_descriptionObject



9
10
11
# File 'app/presenters/www/support_article_presenter.rb', line 9

def page_description
  "Support Article on #{article.description}"
end

#page_titleObject



17
18
19
# File 'app/presenters/www/support_article_presenter.rb', line 17

def page_title
  "#{article.page_title} | #{h.company_locale}"
end