Metadata name versus property for Open Graph


(Bruce Kyle) #1

Hi - long time between posts. Has anyone implemented Open Graph metadata (eg og:title, og:image) in their matrix sites? Having an issue with the format for these. By default matrix puts in metadata in this format:

Where the 'name', 'lang' and 'content' parts are automatically added to the <head> element. The problem with Open Graph is they need a different format:

As you can see 'name' needs to be changed to 'property'.

 

Has anyone managed to make this format work within a matrix metadata schema?


(Bart Banda) #2

I think you will need to output it all manually, via a standard page. So in your parse fiel, in the head section, nest in a standard page. On that standard page, you can customise all the meta tags that you need with tags and metadata keywords. 


(Bruce Kyle) #3

Thanks for the help (got blocked trying to work within the existing metadata schema), I guess I could still use the metadata schema to manage the content (not show on frontend) and then manually code the tags and fill the parse file with global asset metadata values for the og items.


(Bart Banda) #4

Thanks for the help (got blocked trying to work within the existing metadata schema), I guess I could still use the metadata schema to manage the content (not show on frontend) and then manually code the tags and fill the parse file with global asset metadata values for the og items.

 

Yep, that's another option, that's how I've done it before when I've only had to output 1 or 2 custom meta tags.