Рossibility to invoke share link inside .tpl.php

volocuga - May 16, 2009 - 20:25
Project:Share
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:critical
Assigned:volocuga
Status:active
Description

greenSkin,сan you advise how can I put share link into my page.tpl.php?

Thanks!

#1

volocuga - May 17, 2009 - 18:52
Priority:normal» critical

#2

stephencarr - July 10, 2009 - 23:25

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:

print $node->content["'share_1_".$node_id."'"]['#value'];

Edit:

My bad, it can be done:

$node_id = $node->nid;

print $node->content["share_1_$node_id"]['#value'];

Got my quote marks wrong before.

#3

volocuga - August 20, 2009 - 20:28

Thanks 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.

 
 

Drupal is a registered trademark of Dries Buytaert.