I need to know if it's possible to custoimize a theme and say, write <?php print $forward_link ?> exactly where I want the forward link to appear? If not, is there a different module that exposes variables like that for flexibility?

Comments

slowlemur’s picture

You can just make a link to the forward form. It's just at forward/[node_id] and just add that anywhere you wanted the link to be. Is that what you wanted?

print l('Forward to Friend','forward/'.$node->nid, NULL, NULL, NULL, NULL, TRUE).'<br>';

rgracia’s picture

I think so, so [node_id] will be automatically replaced by the current node? Or am I replacing that manually for the node id, which wouldn't really help me, I want the former.

rgracia’s picture

I works well and I have styled the link using css, but now the only problem is that it works only for nodes, not views. I can probably make it disappear for not if the current page is a view. Let's see.

DrupalDummy-1’s picture

I tried this in version 6.9 but unable to make it work. Can someone please help me?

print l('Forward to Friend','forward/'.$node->nid, NULL, NULL, NULL, NULL, TRUE).'<br>'; 

Thanks

liliplanet’s picture

Version: 5.x-1.9 » 6.x-1.x-dev

subscribe, thx!

jct’s picture

This method worked for me, but with slightly different code (also using the envelope image).

<?php print("<a href='/forward?path=node/$node->nid'><img src='/sites/all/modules/forward/forward.gif' alt='forward via e-mail'></a>")?>
DrupalDummy-1’s picture

Thanks for the code.

jct’s picture

Status: Active » Closed (fixed)

You're welcome. If it works for you as well, I'm guessing we can safely close the issue.

DrupalDummy-1’s picture

Yes. It works well. Thanks. Closed.