Via this thread: https://www.drupal.org/node/1688350 we found out how to get the summary in our HTML email instead of the full body text (subs:items:index:#0:as-node:summary).
However now I'm missing the title, the link to the node on our website self and the link to unsubscribe from that nodetype.
I thought I had found out the code for Title: Title: [node:title] but that is shown just as plain text.

What code do I have to use in order to add these items?

Comments

herbiek’s picture

Because there is not reply yet, maybe I have to provide more data. I already have found the variables for adding the link to the content item on our website.

I have added:
[node:title] and
LINK: [node:url] to my template, but the only I see when sending a HTML email is LINK:

I do not understand why the link itself is not visible in the email.

salvis’s picture

Issue tags: -tpl template tag

I'm sorry that you have no answer, I don't have any either.

Some people seem to have success with sending HTML mail, but I've never tried this myself.

Maybe the Preview feature in Mail Editor can help you with experimenting...

herbiek’s picture

Hi Salvis,

I have tried to pick up my issue again to dig a bit deeper why it is not possible to show the URL in the subscription email.

I found that the email template examples for sending notifications about News Items does show both examples as well as recommended tokens and a list of possible variables based on Nodes.

The digest template I'm changing does not show these possible variables based on nodes. I guess this has also something to do with my problem that the variable node:url is not working?
Only the variables based on Current date, Recipient user, Site information, Subscriptions information and Variables are shown (and so only possible?)

Per item in the digest email, I only show the teaser/summery and would like to display the URL to the full node per item in the digest email.

salvis’s picture

Title: How to add link to URL in html template? » Digest: How to add link to URL in html template?

Maybe I've misunderstood your issue.

Have you tried [subs:items:index:#0:as-node:url]?

Essentially, you should be able to add anything that applies to nodes after the last colon.

herbiek’s picture

Hi Salvis,

I didn't tried your solution. I now have added this line to my template and I'm very happy to report that I was able to see a working URL now! (I also have added the missing node title with [subs:items:index:#0:as-node:title] )
I still find the syntax from the templates very cryptic and hard to understand. I thought I have copied a working line from another template, but that was not working as expected.
Thanks for your help!

salvis’s picture

Status: Active » Fixed

In all other templates, you're at the level of a single node, i.e. [node:xxx] gives you the xxx property of the node that you're dealing with.

The digest template is completely different, because you have multiple nodes. Instead of node: you have to write subs:items:index:#0:as-node: to get to the node level, as documented on the digest template edit page.

What instructions would it take for you to understand this out of the box?

herbiek’s picture

Ok, I understand. So I have to specify in more detail.. by starting at a higher level.
One thing that would help me the most is a clear syntax that could be written as code (by using tabs etc). The example templates are very cluttered now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.