Closed (outdated)
Project:
ShareThis
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
23 Aug 2011 at 17:12 UTC
Updated:
2 Mar 2023 at 14:27 UTC
Jump to comment: Most recent
Is there some way to do this? I don't see a block to work with and the links are not appearing. (I have the module configured to add the icons to every content type except webforms.) Thanks!
Comments
Comment #1
jvalencia commentedI've had no problems doing this,
What is your homepage nodetype?
Comment #2
m.e. commentedCan you tell me how to find this information in the source code? The theme I'm using is complex.
Comment #3
m.e. commentedJust a poke to see if you can help me get the info you need. Thanks.
Comment #4
jvalencia commentedThe sharethis code gets all the nodes that are registered with drupal:
Then it saves to the database those that the user selects in the config page.
At display time, it checks to see if the node being displayed is the same type as that saved in the DB:
You could output the $node->type to check why it isn't displaying on your homepage.
Comment #5
m.e. commentedOk, my homepage type is blogpost.
In module configuration, blogpost is definitely selected as one of the node types where buttons should appear.
Comment #6
jvalencia commentedTwo possible thoughts,
First do you have teaser mode enabled? and is your front page a teaser view? (If you click on the title, does it take you to a page where the buttons show up with the article?)
Second, is blogpost ajax? Because that would be a different issue altogether...
Comment #7
m.e. commentedI have no idea if blogpost is ajax ....
I don't have teaser mode enabled. I can see the links on individual articles when I click in from the teaser.
Just to be clear, I am not looking for links on front page teasers. I am looking for a way to have the links show up on my front page so that my primary URL / homepage itself can be shared independently of inner content.
Comment #8
jvalencia commentedI see,
Currently the 7x branch only adds to a node. Since your front page sounds like it contains node(s), it will try to add to those.
In that case, you might want to add the script and span tags to the front page directly: (through templates)
ie:
As time permits I am working on a block version of the module (instead of node-centric). That may eventually serve your needs better.
Comment #9
m.e. commentedExcellent - I will look forward to the block, but meanwhile I was able to perform the hack you suggested and it's working fine. Thanks!
Comment #10
jvalencia commented7.2 adds the block
Comment #11
robloachComment #12
m.e. commentedI'm now using the block on most of my content. Excellent new feature! Thanks!
For my front page, I actually ended up leaving in the hack because the ShareThis icons need to display in a totally different region than on inner pages.
Comment #13
jvalencia commentedYou can modify the theme to have a region only on the front page which you can place the block in.
However, it looks like you might need two blocks for this? Unfortunately this is where my Drupal knowledge is deficient. Perhaps Rob knows the answer...
Comment #14
robloachMaybe adding Context module support so we can put the ShareThis widget in any region depending on a given set of parameters? Not sure... What exactly did you want to accomplish?
Comment #15
m.e. commentedContext might work for that .... I haven't tried it. Right now I'm satisfied with where things stand, really.
Comment #16
robloachI'll set this to postponed for if someone wants Context support.
Comment #17
vladimirausIssue was inactive for more than 9 years. Closing.
Feel free to reopen if you feel that it is still relevant. ⏳