Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Jeff Wallace
Sep 21, 2010
  5065
(3 votes)

ShareThis and FacebookLike Dynamic Content Modules plus a DropDown Property Type

Based on CMS 6.0

Sharing content with ones social networks is a popular topic in the web world today.  It can act as a means of free advertising or more simply as a way of letting your network know when you come across something fun, interesting, etc.  Adding ShareThis, AddThis, Facebook Like, etc buttons is very easy if you work with HTML or javascript frequently. After all, you can get the code for each with a few minor configurations and clicks on the respective organizations sites.  However, all Content Authors/Editors may not understand HTML/javascript or want to deal with it.  Or, maybe they just want a simple way to add and configure buttons at locations they desire through standard EPiServer methodologies.  I spent a bit of time creating some Dynamic Content controls which will allow just this capability.  For more on Dynamic Content read here.  Otherwise, continue on with more details of my efforts.

 

Here’s what I’ve created:

1. "ShareThis" Dynamic Content module

a. The Dynamic Content item allows a Content Author (Editor) to add a ShareThis button anywhere on the page through a friendly GUI
     i.  This may be beneficial for Content Authors who are not comfortable with adding this to the Editor HTML or Page Template ASPX
b. It allows the Content Author to configure the text associated with the button (when applicable)
c. It allows the Content Author to configure and select between different button types:
    i.   Multiple Icons
    ii.  Standard Icon
    iii. Rotating Icon
    iv. Vertical Counter
    v.  Horizontal Counter

d. clip_image001

e. image

2. "Facebook Like" Dynamic Content module

a. It allows the Content Author to configure the text associated with the button based on the pre-defined "Facebook Like" options:
     i.  Like
    ii.  Recommend
b. It allows the Content Author to configure and select between different button types:
     i.  Standard Icon
     ii. Button Count Icon

c. clip_image003

d. image

3. "DropDown" Custom Property

a. This includes custom settings based on the CMS 6 Settings on Properties functionality so that the user can configure the items listed in the DropDown
b. I use this in my Dynamic Content items above, but created it with the specific intent of making this useful for other purposes as well

c. clip_image005

d. clip_image006

Attached you will find the code and a basic ReadMe.txt file with instructions to set this up.  I’ll beg your forgiveness for not creating an installer.  :)  You will have to add the code files to your project, compile, and update episerver.config.  The code was written for the Alloy Technologies templates and CMS 6.  The associated directories and namespaces align with this but could easily be changed for other templates.  Also note, it would probably be an improvement to add a call to RegisterClientScriptBlock() for the script being added to the page.  Other optimizations and edits are also possible. This is merely a conceptual starting point and a nice way to demo Dynamic Content and social features.

 

Cheers.

Sep 21, 2010

Comments

Helen Hopkinson
Helen Hopkinson Sep 22, 2010 08:38 AM

Great stuff Jeff. Me like!

Sep 22, 2010 02:50 PM

Thanks Helen. :)

Sep 23, 2010 10:52 AM

Yes, well done!

Feb 4, 2011 03:11 PM

Caliming love to this dynamic content!! "Nice-a-licius"

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog