Class: Www::SupportArticlePresenter

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

Overview

Presenter: support article presenter.

Instance Method Summary collapse

Instance Method Details



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

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



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

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

#og_imageObject



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

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

#page_descriptionObject



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

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

#page_titleObject



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

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