Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
I am finding it can be done but not really dynamically:
print $node->content['share_1_123']['#value'];
Obviously this will only output the share code for nid 123. It seems to not be possible to input the nid variable into the string, something like this fails:
Comments
Comment #1
volocuga commentedComment #2
stephencarr commentedI am finding it can be done but not really dynamically:
Obviously this will only output the share code for nid 123. It seems to not be possible to input the nid variable into the string, something like this fails:
Edit:
My bad, it can be done:
Got my quote marks wrong before.
Comment #3
volocuga commentedThanks stephencarr!
I tested the code you provided and it does not work for me :(
What is "1" between "share" and "$node"? Is it share widget ID?
Thanks again.