Bring social media links and shared to SilverStripe, (*1)
What it do:
- Add default shared image to SiteConfig as $SiteConfig.Image
- Add shared image to page as $Image, (*2)
How it works:
- The page containing $Image in MetaData is taken instead of $SiteConfig.Image when configured.
- The $SiteConfig.Image will be taken if $image isnt added inside pages.
- Add automatically in head of your pages additionnals MetaData to override random shares images, (*3)
Social media usage:
- And include SocialMediaShares into page templates to display social media sharing capabilities
- Select one of the theme styles or choose your own design, (*4)
Good for:
- News shared image
- Portfolio shared image
- Blog shared image, (*5)
Informations for your page templates:
- If you use a different image field name (ex.: NewsImage), you can duplicate it like:, (*6)
$this->ImageID = $this->NewsImageID;
-
Remember to hide $Image when doing this operation:, (*7)
$fields->addFieldToTab('Root.Main.Metadata', new HiddenField("Image","Image"));, (*8)
TODO:
- Translation to other language
- Include SocialMediaLinks to display social media link into a templates (not ready at this time), (*9)