iozay Posted September 26, 2016 Posted September 26, 2016 Hi there, Is there a way to dynamically add the OG:image URL in the header of the page using pages without using the SEO tools? The SEO tools are not exactly dependable and not very user friendly. I want to use an image that is uploaded in pages for that specific entry For who doesn't know what og:image is: Facebook, and other tools show this image when sharing a page Its extremely useful for articles.
opentype Posted September 26, 2016 Posted September 26, 2016 If you use the Record Image field, it will automatically populate the og:image field with the image uploaded to that field. Otherwise you can assign any meta tags (including Open Graph, Twitter Cards) like this from within the template. {{\IPS\Output::i()->metaTags['twitter:image'] = (string) \IPS\File::get('cms_Records', $record->record_image ) ->url;}}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.