Page 1 of 1

Open Graph - Intro Text as description but showing meta desc.

Posted: 10 Mar 2017, 10:25
by sven@mediafish.es
Hi,

On http://atlantisfm.mediafish.es/nachrich ... enf-sterne

I chose: Use Intro Text as description in the settings (Common Options)

But the OG:description takes the meta description of the article - or in this case category as it is a category blog.
If we can choose this option wouldn't it be nice if it chose the intro text always.?

Thanks for your help

Re: Open Graph - Intro Text as description but showing meta desc.

Posted: 12 Mar 2017, 15:53
by Jan
Hi, this is the flow of description:

Code: Select all

if ($this->params->get('description'.$suffix, '') != '') { // description in params
			plgContentPhocaOpenGraphHelper::renderTag('og:description', $this->params->get('description'.$suffix, ''), $type);
		} else if (isset($thisDesc) && $thisDesc != '') { // article meta description
			plgContentPhocaOpenGraphHelper::renderTag('og:description', $thisDesc, $type);
		} else if ($row->params->get('menu-meta_description') != '') { // menu link meta description
			plgContentPhocaOpenGraphHelper::renderTag('og:description', $row->params->get('menu-meta_description'), $type);
		} else if (isset($row->introtext) && $row->introtext != '' && $desc_intro == 1) { // artcle introtext
			...
			plgContentPhocaOpenGraphHelper::renderTag('og:description', $iTD, $type);
		} else if ($config->get('MetaDesc') != '') { // site meta desc
			plgContentPhocaOpenGraphHelper::renderTag('og:description', $config->get('MetaDesc'), $type);
		}
Parameters description -> Article Meta description -> Menu Link Meta description -> Article introtext -> Site Meta description

So changing the condition can change the flow of adding the description, the same for images, and others:
https://www.phoca.cz/documents/70-phoca- ... open-graph
https://www.phoca.cz/documents/70-phoca- ... open-graph

Jan

Re: Open Graph - Intro Text as description but showing meta desc.

Posted: 17 Mar 2017, 13:09
by sven@mediafish.es
thanks