tokens for Node reference field in digest mail using D7

84 Views Asked by At

I am using Subscriptions module in D7.

I am generating template for Digest subscription mail. I am having a node reference field for image. I want to add that image in digest mail how can I add?

For single mail I am using tokens like [node:field-blog-image:field_master_image]. This works fine for single mail but not for digest mail. I also have tried like [subs:items:index:#0:as-node:field-blog-image:field_master_image]. But this is not working.

Please help me....

2

There are 2 best solutions below

0
On

Try to add your HOOK to alter digest email data. Ref : https://www.drupal.org/files/issues/subscriptions_mail.cron_.inc_.648600.8_0.patch

This one is for Drupal 6 but you can apply same logic to Drupal 7.

Unfortunately need to hack contributed module but it works. If any one have better solution please suggest.

Cheers!!!

0
On

Yess, we can add hook for altering digest mail data.

The alternative option for this is as follows:

  1. Setup up the html structure for particular node type for which you wish to send digest mail.
  2. And in the digest-mail option put token as [subs:items:index:#0:formatted]. It will automatically shows the formatted html including images in digest mail.