I want to show the addthis button just after the heading at the top (along with the default placement in the link area near add comment). I see no option for such placement. What should I do to achieve this result? Usually on most professional website addthis is shown on top only. Please help!

Comments

babbage’s picture

You could easily do it in a custom node.tpl.php in your theme, as AddThis is output in the $links variable. See #691032-4: AddThis button does not appear if links are excluded in node.tpl.php through theme

vesapalmu’s picture

Assigned: Unassigned » vesapalmu
Status: Active » Fixed

You could also use the addthis block and place it in your page heading if your theme has any regions in the heading.

Hope one of these answers helps you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

SDM-MINK’s picture

Version: 6.x-2.8 » 6.x-2.9

I am a drupal & php novice. I am using an override theme_addthis_button function and the button is appearing at the bottom of each node (full & teaser). I would like to move the button so that it appears at the top of each node (full & teaser). I understand that I can modify the node.tpl.php in my theme to move the AddThis button. But how do I access only the AddThis Button in the $links variable ($links['addthis_button'])?

Can I use this code?
if ($links['addthis_button']):

endif;

May I place this code after
if ($page == 0):
and before

print $node_url; "> print $title;

endif;
in the node.tpl.php file?

Also, will this code modification stop the button from also appearing at the bottom of each node (full & teaser)?

Please note that I want an alternative to controlling the placement of the button using the AddThis Block since I want the button to appear at the top of several node teasers placed on a single page.

Thanks a bunch!

ManuAdam’s picture

It could not be really clear how to place the button on top after heading. Should the code: print $links['addthis_button']; be put before print $content in node.tpl.. bu then it won't show after title. besides if one needs to create custom node.tpl then what is the use of this module if it cant even provide this option of placement - one can as well use the simple one line code provided by addthis site to show the button without any need of this additional module.

iantresman’s picture

If you're going to position the Addthis button using a custom node.tpl.php, then you don't need the module, as you can paste the Addthis HTML code into the template.

Not all themes have a block directly above a node. So it would be useful to have an option to display the Addthis button, either at the top, or bottom of a node.

guruslot’s picture

I have edited node.tpl.php and print $links['addthis_button'] above the content but:
Now I'd like to remove addthis' links from the $links below the content.
Does someone could recommend the best way to perform this?

Thanks in advance!

zil0484’s picture

I have the same problem. pls help

rastarr’s picture

Jeez, just when I thought I'd found the perfect all-in-one sharing module, along comes a snag.

I'm currently using 3 different sharing modules which all allow themselves to be placed at the top of the content. Opinion looks like it's divided on where the best place should be BUT for me and a lot of other site owners, including the majority of websites I visit, it seems to be at the top of content, under the title.

Can I ask why this option isn't available for a major sharing platform? I know I can start hacking tpl files and all that but I was originally attracted to Drupal by it's built in flexibility.

I wonder whether a CCK field can include the AddThis buttons? (but then we get the duplication issue of them also appearing in the links area as well.

Such a minor config addition which prevents better configuration, if you ask me.