small fix
This commit is contained in:
parent
28937534fe
commit
73ad4a5eb4
|
@ -294,7 +294,11 @@ class AnnouncementsController < ApplicationController
|
||||||
desc = (desc.nil? || desc == "" ? "announcement image" : desc)
|
desc = (desc.nil? || desc == "" ? "announcement image" : desc)
|
||||||
|
|
||||||
request = OrbitHelper.request
|
request = OrbitHelper.request
|
||||||
meta_desc = announcement["subtitle_translations"].present? && announcement["subtitle_translations"][locale] != "" ? announcement["subtitle_translations"][locale] : announcement["text_translations"][locale][0..200]
|
if announcement["subtitle_translations"].present?
|
||||||
|
meta_desc = announcement["subtitle_translations"][locale] != "" ? announcement["subtitle_translations"][locale] : announcement["text_translations"][locale][0..200]
|
||||||
|
else
|
||||||
|
meta_desc = ""
|
||||||
|
end
|
||||||
|
|
||||||
OrbitHelper.render_meta_tags([{"property" => "og:title", "content" => announcement["title_translations"][locale]},{"property" => "og:site_name", "content" => Site.first.title},{"property" => "og:url", "content" => request.original_url},{"property" => "og:description", "content" => meta_desc},{"property" => "og:image", "content" => announcement["image"]["original"]},{"property" => "og:type", "content" => "Article"}])
|
OrbitHelper.render_meta_tags([{"property" => "og:title", "content" => announcement["title_translations"][locale]},{"property" => "og:site_name", "content" => Site.first.title},{"property" => "og:url", "content" => request.original_url},{"property" => "og:description", "content" => meta_desc},{"property" => "og:image", "content" => announcement["image"]["original"]},{"property" => "og:type", "content" => "Article"}])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue