urmaul / yii-opengraph
Yii component to store and render opengraph tags.
Installs: 63
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/urmaul/yii-opengraph
Requires
- yiisoft/yii: ~1.1.15
This package is not auto-updated.
Last update: 2025-09-27 20:30:50 UTC
README
Yii component to store and render opengraph tags.
Why
- You can make only first/last occurance of metatag to be rendered.
- It converts image links to absolute.
- You'll white it anyway.
Supported tags
- og:title
- og:url
- og:description
- og:image
Installing
Add this to "components" part of your config.
'og' => array( 'class' => 'ext.opengraph.Opengraph', ),
Using
// Set og:image Yii::app()->og->image = $imageUrl; // Set og:image if not set Yii::app()->og->setImage($imageUrl, false); // Flush contents to ClientScript Yii::app()->og->flush();