Question

I have a personal page (not a cms) where I want to insert multiple sharethis plugin But it seems that code is setted only for one in the page

code into HEAD:

<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "c980sss5aeb6640f"}); </script>

code into body:

<span class='st_sharethis' displayText='ShareThis'></span>
<span class='st_facebook' displayText='Facebook'></span>
<span class='st_twitter' displayText='Tweet'></span>
<span class='st_linkedin' displayText='LinkedIn'></span>
<span class='st_email' displayText='Email'></span>

...how can I set multiple in your opinion?

The problem is that I want that every group of share buttons will be referred to a different post. I have different post in my page and I want that everyone has a sharethis group of icon like that and that they will be referred to a specific url

Was it helpful?

Solution

Ok i found it by myself

this is the answer:

<span class='st_sharethis' st_title='<%= scoop.title; %>' 
      st_url='<%= scoop.url; %>' displayText='ShareThis'></span>
<span class='st_facebook' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>' displayText='Facebook'></span>
<span class='st_twitter' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>' displayText='Twitter' ></span>
<span class='st_pinterest' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>' displayText='Pinterest' ></span>
<span class='st_email' st_title='<%= scoop.title %>' 
      st_url='<%= scoop.url; %>'    displayText='Email'></span>

OTHER TIPS

This code is working for me.

http://jsfiddle.net/zxg59/

I would just duplicate the code in the body, but not the script tags in the head.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top