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

Question about all Phoca plugins except Phoca Gallery plugins which have own forum
sven@mediafish.es
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 12 May 2015, 10:02

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

Post by sven@mediafish.es » 10 Mar 2017, 10:25

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


User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 37911
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan » 12 Mar 2017, 15:53

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:
http://www.phoca.cz/documents/70-phoca- ... open-graph
http://www.phoca.cz/documents/70-phoca- ... open-graph

Jan
If you find Phoca extensions useful, please support the project


Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest