Page 1 of 1

NMS - capture message id into the message template?

Posted: Thu Dec 17, 2009 3:15 pm
by tinhat
I want to create link to put into the message template so that subscribers can click on a "send this newsletter to a friend" link to a form on the website which will allow them to enter the name and email address of a friend they want to send  a link to the archived view of that message. I figure if I know how to embed the message id into the message template I can figure out a solution - but I don't know how to access the message id in the message temple. Any help? Any suggestions?

Thanks.

Re: NMS - capture message id into the message template?

Posted: Fri Dec 18, 2009 1:34 pm
by RobinH
I would also be interested in finding a solution for this.  I would like to be able to "Forward this message to a friend" and I would also like to create a link to enable the user to "click here to display this message in your web browser".

In both cases I need to be able to link to the archived view of that message.

I would be grateful if anybody could help with this.

Thanks

Re: NMS - capture message id into the message template?

Posted: Fri Jan 15, 2010 12:44 am
by tinhat
In NMS.module.php

Around line 630 (after the "setup smarty" comment) I added the following line:
[php]
$smarty->assign('messageid', $this->current_message);
[/php]

Which gives me a smarty tag {$messageid} which I can use in my newsletter template.

Ideally, it would be good to know if there is any other already existing smarty variable I could use without having to hack NMS.module.php as above?