#468 Posted in ‘Econa’

Latest post by Lefteris Kavadas on Friday, 03 April 2020 12:24 EEST

herve D
 Hi,

The image (Econa) does not appear if I copy the link in a facebook page (twitter ...) !
Is it possible that you improve this possibility?
Regards

Lefteris Kavadas
Hi,

That's really a nice addition. We will consider it for sure. Until then you can just the following snippet in the article layout override to achieve what you want:
if (isset($this->item->jcfields[1]))
{
        $document = JFactory::getDocument();
	$document->setMetadata('og:image', substr(JUri::root(false), 0, -1).$this->item->jcfields[1]->image->src, 'property');
}


Note that this code is for Joomla articles and assumes that you are using Econa as a custom field and the field ID is 1.
If you are not using Econa as a custom field then you can install Route 66 which allows you to set the article's intro/full image as Open Graph tags.

Regards

herve D
Hi,
I use Econa as a custom field, but will it work with other extensions like dpcalendar too?
I noted for the articles, it will serve one day. Thank you
Regards

Lefteris Kavadas
The logic should be similar for any extension that is using custom fields. Give it a try and let me know.

Regards

herve D
Hi,
I did not arrive there but as it is not very urgent. I prefer to wait for your integration. Can you integrate it with the next update. Thank you
Regards

Lefteris Kavadas
Hi,

I will try to add it in the next update.

Regards

herve D
HI
Ok thanks
Regards

herve D
HI,
I tested well and it works. Great!
Is there anything to do for other networks ..? because i don't see the image for twitter ? .
Regards

Lefteris Kavadas
Hi,

Twitter is also using the same open graph tags so it's a bit weird that it doesn't work. I will make some tests and let you know.

Regards

Note: An active subscription is required in order to get support for our paid extensions. For our free extensions, if you don't have an account, register and then submit your support request.  In case you just want to ask a question, you can also use the contact form .

Firecoders
Are you using our extensions? Please post a review at the Joomla extensions directory!
Post a review