page share for fb
This commit is contained in:
parent
7a3e3b7ef3
commit
4276840113
|
@ -195,6 +195,10 @@ class NewsController < ApplicationController
|
||||||
links = news.news_bulletin_links.collect{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue []
|
links = news.news_bulletin_links.collect{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue []
|
||||||
update_user = news.update_user.member_profile.name rescue ""
|
update_user = news.update_user.member_profile.name rescue ""
|
||||||
department = news.department rescue ""
|
department = news.department rescue ""
|
||||||
|
|
||||||
|
request = OrbitHelper.request
|
||||||
|
meta_desc = news.subtitle.nil? || news.subtitle == "" ? news.text[0..200] : news.subtitle
|
||||||
|
OrbitHelper.render_meta_tags([{"property" => "og:title", "content" => news.title},{"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" => "#{request.base_url}#{news.image.url}"},{"property" => "og:type", "content" => "Article"}])
|
||||||
{
|
{
|
||||||
"tags" => tags,
|
"tags" => tags,
|
||||||
"news_bulletin_files" => files,
|
"news_bulletin_files" => files,
|
||||||
|
|
Loading…
Reference in New Issue