Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi all,
I've got a Views page and would like the AddThis button to show up on that page. The AddThis button currently shows up on all the other node pages. How can I get AddThis on a Views page?
Thanks in advance.
Comments
Comment #1
vesapalmu CreditAttribution: vesapalmu commentedYou have two options with views. If you want to display AddThis on every node in your view you can use existing views integration and add "Node: AddThis" field to your view. If you want to display just one button and share the entire view you can enable AddThis block from admin/build/block.
Hope this helps.
Comment #3
ethan.han777 CreditAttribution: ethan.han777 commentedHi I'm using addthis 7.x-2.1 beta1
I don't see 'node:addthis' in views fields.
is this feature gone in this version?
thank you,
Comment #4
ehalber CreditAttribution: ehalber commentedI don't see this option anywhere. I was thinking that I would just create an additional field in views and copy and paste the code into a rewrite textbox there. I think that will do it. I will post again if this solution is viable.
Comment #5
TelFiRE CreditAttribution: TelFiRE commentedI know that this was changed to "Content: Share"
However, on one of my sites I am now not seeing even that...
Update: Okay, I discovered why it is not showing up. It is now based on the name of the field and my old field happened to be called "Share". I didn't realize you had to add a field to the content type first.
Pretty please add this to your documentation or something like it:
Quick-Setup for Views:
1. Enable the AddThis and AddThis Displays modules.
2. Add an AddThis field to a new or existing content type.
3. Add the field to your view.
Comment #6
andreoman CreditAttribution: andreoman commentedWhen I set "YES" for Views settings Advanced -> Other -> Use AJAX
my VIEW stopped working correctly. The first page displays addthis toolbox, but when I click to another page (the content of the page is updated with AJAX) toolbox is not displayed.
But when set Use AJAX = "NO" VIEW works correctly.
What is wrong ?
Comment #7
matglas86 CreditAttribution: matglas86 commentedI know we fixed this in 7.x-4.x its in this commit. http://drupalcode.org/project/addthis.git/blobdiff/176c5c3385c78e1da3023...
Its related to this issue #1381470: Button not working on ajax pages
Maybe you can backport it. We don't support the 2.x branch anymore but if you have a port I can add it to the dev version. Thats it, no release or garentees. Sorry.
Comment #8
andreoman CreditAttribution: andreoman commentedIt dosen't work !
Comment #9
andreoman CreditAttribution: andreoman commentedAfter hours of searching and trying I wrote the following,
changed the text in the addthis.js:
Comment #10
matglas86 CreditAttribution: matglas86 commentedDid this do the trick for you? How did you came up with this solution?
Comment #11
andreoman CreditAttribution: andreoman commentedIt helped me, but it does not work in IE9 :(
row 9 :
'addthis' is null or not an object
Comment #12
leymannxFor me views support worked in 4.0-alpha2. I first had to add a AddThis field to the content type and then were able inside the view to add a field content: AddThis and finally just had to chose a formatter (button or toolbox).
Block support: For all using the block and wondering why the block doesn't appear anymore after updating the module: In the block config you now have to chose a display type (button or toolbox).
Comment #13
see15_aug CreditAttribution: see15_aug commentedThanks for ur post.. #12
u saved my time... :)
Comment #14
zJoriz CreditAttribution: zJoriz commentedNot quite sure if this question belongs here, seems like a good bet though.
On the documentation homepage it says
However, it isn't clear to me where I should insert this snippet. addthis.js? a tpl.php file?
I'm off to try suggestion #12 now (installing 7.x-4.0-alpha2 despite the recommendation not to).
In the meantime, thanks for your hard work so far! This module is very neat and super handy.
Comment #15
matglas86 CreditAttribution: matglas86 commentedTo the previous commenter I suggest to download alpha3 that has this fix in it. And with the rest of this issue I believe its fixed all in alpha3.
Comment #17
anandbej CreditAttribution: anandbej commented#5 worked like a charm. Thanks
After adding the display field it didnt work for me. I then changed the format of the share field. Just pointing this out. Maybe it'll help someone.
Comment #18
slinky CreditAttribution: slinky commentedThanks for the comment about how to add addthis to a page re comment #5. I upgraded and lost addthis and couldn't re-enable. It was an impossible mission to figure out what was missing as the js was loading but I didn't see the widget. Re-adding a new field in the manage views on pages added the widget back. It's great to use for precision placement but if you don't mention how to implement, it doesn't show! Thanks for taking the time to explain and hope my explanation also adds further clarity.