Keyword

Opengraph Image tag not being rendered

  • Mark Fallon
  • Mark Fallon's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago #132663 by Mark Fallon
Replied by Mark Fallon on topic Re: Opengraph Image tag not being rendered
I can't find any reference to any of the Opengraph meta tags in item.php... can you be more specific?

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 11 months ago #132664 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Opengraph Image tag not being rendered
You do no need to find any reference.

You simply need to add a new metatag if an image is not present.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mark Fallon
  • Mark Fallon's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago #132665 by Mark Fallon
Replied by Mark Fallon on topic Re: Opengraph Image tag not being rendered
OK. I could have just done that anyway. I wanted to to keep my code clean by just editing it where K2 sets the meta tag but it seems we don't know where that is.

I have done it the way you suggested instead and although being quite a hacky way, it does work.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 11 months ago #132666 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Opengraph Image tag not being rendered
It is not hacky.
You get to keep your edits even if you update K2.

If you tried the other way you would have to backup and re-patch K2 after every update.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Mark Fallon
  • Mark Fallon's Avatar Topic Author
  • Offline
  • New Member
More
9 years 11 months ago #132667 by Mark Fallon
Replied by Mark Fallon on topic Re: Opengraph Image tag not being rendered
I wanted to use template overrides to change the correct file and in the correct LOGICAL place.

Placing this code into a random place in a file that doesn't deal with the generation of the og meta tags, IS a hacky way of doing it.

It would make more sense to to edit the relevant code that generates the meta tags, in the relevant file (using a template override obviously), rather than just placing it in any old place in the item.php file.

But I suppose I like to keep my code neat and logical. Other people may not.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 11 months ago #132668 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Opengraph Image tag not being rendered
Exactly

Some people help you with your project for free while other may don't.
Anyway it works like this.

Either hack core files or change item.php
No other file can be overriden.

I am locking the topic now.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum