The social button module allows us to use tokens so the share button can target the node url instead of the page url, when we are using views to display content. However, I'm not sure how the code and tokens should be used to achieve this. My code for the addthis button is as follows:

<div class="addthis_counter addthis_pill_style"></div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52a0220165a70d6d"></script>

The code I'm currently using (as shown above) shares the entire page instead of the node which the button is attached to. Social buttons module allows the addition of a field to the content type so the button is tied to the particular content node and I'm trying to get the button to share the content in the node rather than the page, which is a view listing.

So my question is, how do I use tokens in the code for the share button?

  • 1
    That's fine, but what is your question? – Mołot Dec 12 '13 at 8:42
  • Please use edit link. – Mołot Dec 13 '13 at 9:59

I managed to target the individual content nodes using the following code. Hope this helps someone.

<a href="http://www.addthis.com/bookmark.php"
    class="addthis_counter addthis_pill_style"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.