feat: OG Image in Chatwoot Help Center (#11826)
_Note: This is only available for Cloud version of Chatwoot._ 
This commit is contained in:
@@ -17,7 +17,9 @@ class Public::Api::V1::Portals::ArticlesController < Public::Api::V1::Portals::B
|
||||
limit_results
|
||||
end
|
||||
|
||||
def show; end
|
||||
def show
|
||||
@og_image_url = helpers.set_og_image_url(@portal.name, @article.title)
|
||||
end
|
||||
|
||||
def tracking_pixel
|
||||
@article = @portal.articles.find_by(slug: permitted_params[:article_slug])
|
||||
|
||||
@@ -8,7 +8,9 @@ class Public::Api::V1::Portals::CategoriesController < Public::Api::V1::Portals:
|
||||
@categories = @portal.categories.order(position: :asc)
|
||||
end
|
||||
|
||||
def show; end
|
||||
def show
|
||||
@og_image_url = helpers.set_og_image_url(@portal.name, @category.name)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@ class Public::Api::V1::PortalsController < Public::Api::V1::Portals::BaseControl
|
||||
before_action :redirect_to_portal_with_locale, only: [:show]
|
||||
layout 'portal'
|
||||
|
||||
def show; end
|
||||
def show
|
||||
@og_image_url = helpers.set_og_image_url('', @portal.header_text)
|
||||
end
|
||||
|
||||
def sitemap
|
||||
@help_center_url = @portal.custom_domain || ChatwootApp.help_center_root
|
||||
|
||||
Reference in New Issue
Block a user