Page 1 of 1
Open Graph site description x article description
Posted: 07 Feb 2016, 20:23
by ChrisCross
Hi,
I've noticed that if I add a site description and title to the settings, it overrides the article description and only shows the site title/description instead of both.
Is that the normal behaviour? I was expecting it to populate the article title and description from the article and add the site description and title from the static.
Thanks,
C
Re: Open Graph site description x article description
Posted: 11 Feb 2016, 14:43
by Jan
Hi,
this way the description works:
Code: Select all
// Description
if ($this->params->get('description'.$suffix, '') != '') {
plgContentPhocaOpenGraphHelper::renderTag('og:description', $this->params->get('description'.$suffix, ''), $type);
} else if (isset($thisDesc) && $thisDesc != '') {
plgContentPhocaOpenGraphHelper::renderTag('og:description', $thisDesc, $type);
} else if ($config->get('MetaDesc') != '') {
plgContentPhocaOpenGraphHelper::renderTag('og:description', $config->get('MetaDesc'), $type);
} else if (isset($row->introtext) && $row->introtext != '' && $desc_intro == 1) {
$iTD = str_replace("\r\n", ' ', strip_tags($row->introtext));
$iTD = str_replace("\n", ' ', $iTD);
$iTD = str_replace("\n", ' ', $iTD);
plgContentPhocaOpenGraphHelper::renderTag('og:description', $iTD, $type);
}
There is a description rule, if it is not the case then it always comes to next rule:
-> description from the parameter
-> description from meta tags
-> description from Joomla! meta tag
-> description from text directly
To get other output, you need to customize the code directly to fit your needs. To move different rules each other.
Jan