I send digest newsletters with the subscription module (using the templates that comes with the module), sometimes containing a small image before the teasertext (positioned with tables/row/column). This is all working well.
However in case there is no image available (because there is no teaser image uploaded to the applicable field or the contentitem doesn't even have a image field with that name) I get an ugly image outline in most email clients. I would like to test if there is an image available and if not, not adding the first ... leaving only the teaser text.
Can someone explain which "template" code must be used in order to achieve this?
Code used so far:
Your subscriptions on [site:name] notify you of the following changes since the previous digest:<br />
{{[subs:items:count]#<img src="http://@mydomain@/Newsletter/fine-line.jpg" width="580" height="18"><br />
#1 of [subs:items:count] {{[subs:items:index:#0:subs:is-new]?(new):}}{{[subs:items:index:#0:subs:is-updated]?(updated):}}{{[subs:items:index:#0:subs:is-old]?(commented): <b>[subs:items:index:#0:as-node:title]</b>}}
<table border="0" width="100%" padding="5">
<tr>
<td valign="top"><img src="[subs:items:index:#0:as-node:field_news_image]" alt="teaser image" width="100" /></td>
<td style="font-family: Calibri, Arial, Helvetica, sans-serif;" valign="top" align="left">[subs:items:index:#0:as-node:summary]</td>
</tr>
</table>
Read more: [subs:items:index:#0:as-node:url]<br />
}}