Skip to content

intwebg/silverstripe-extrameta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SocialMediaPack

Bring social media links and shared to SilverStripe

What it do:

  • Add default shared image to SiteConfig as $SiteConfig.Image
  • Add shared image to page as $Image

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

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

Good for:

  • News shared image
  • Portfolio shared image
  • Blog shared image

Informations for your page templates:

  • If you use a different image field name (ex.: NewsImage), you can duplicate it like:

    $this->ImageID = $this->NewsImageID;

  • Remember to hide $Image when doing this operation:

    $fields->addFieldToTab('Root.Main.Metadata', new HiddenField("Image","Image"));

TODO:

  • Translation to other language
  • Include SocialMediaLinks to display social media link into a templates (not ready at this time)

About

Bring social media links and shares for SilverStripe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published