Adds sharing links and buttons for Facebook, X (Twitter), Instagram, Pinterest as well as AddThis to the site.
- SilverStripe CMS 5.x
Note: this version is compatible with SilverStripe 5. For SilverStripe 4, please see the 3.x release line. For SilverStripe 3, please see the 2.x release line.
Install the module using composer:
composer require innoweb/silverstripe-social-share dev-master
Then run dev/build.
The module adds a new tab to the SiteConfig in the CMS where the sharing options can be managed.
To add the sharing links to your site, add the following include to your Page.ss
template:
<% include PageShareLinks %>
This will activate sharing for the current page.
You can also activate sharing of the base URL of the site for all pages. For that, activate the following setting in your config.yml
:
Innoweb\SocialShare\Extensions\ConfigExtension:
enable_base_share: true
You also have to add the following include to your Page.ss
file:
<% include BaseShareLinks %>
The module supports multisites and configured-multisites and by default adds the config options to the Sites.
If you want to manage the social links globally, please add the following settings in your config.yml
:
Innoweb\SocialShare\Extensions\ConfigExtension:
multisites_enable_global_settings: true
This will add the fields to your SiteConfig instead of Site.
BSD 3-Clause License, see License