Community & Support

printing link to share on facebook

I am trying to print a link to facebook in my page template using the following statement.

<a href="http://www.facebook.com/share.php?u=<?php print $node_url; ?>"  title="Share on Facebook"><span class='hidden'>Share this on Facebook</span>

My code is not printing the php statement. I am looking for a little help with the correct way to enter this statement.

Thank you.

Comments

There's no such variable as $node_url

Your problem is that you're referring to a nonexistent variable in a page template.

http://api.drupal.org/api/drupal/modules--system--page.tpl.php/6

Your right. I got it to work.

Your right. I got it to work.

nobody click here