A nice share-bar is a must-have if you want to run your Orchard-based blog. I needed it, and so it is In addition to the Orchard Gallery, module is also available on Codeplex, if you’d like to play with the source code.
Module delivers content sharing functionality via AddThis sharing service. I made a decision to use that instead of simply listing available social-sharing icons and links (or using Microsoft.Web.Helpers) because:
- You get sharing analytics out-of-the-box
- It is very easy to customize
- I haven’t thought that there is that many sites you can share your content on
Adding sharing functionality to content items
The module adds new Content Part – ShareBar, which you can add to your content types to instantly add sharing functionality. This part needs an appropriate URL to share, so it can be only applied to items, that have a RoutePart.
Unfortunately, there is no simple way in Orchard to disallow users to add this part to items without RoutePart. I’ve found a workaround to this – ShareBar just doesn’t get displayed in such scenario.
Customizing share bar look
When adding ShareBar part to your content type, you can customize how it should look like – I provided some predefined styles. You can preview them here. In the next releases I’ll provide more options for customization.
To change the appearance you just have to do: Content Types –> choose type and click edit –> choose style in Share Bar settings (if it’s not there then you have to add ShareBar part first).
And that’s almost all!
There’s one last thing you have to do after that – plug in your account to gather analytics data. You have to set your AddThis account name in Site—>Settings pane in order to make sharing bar visible.
Hope you enjoy it! Cheers!