5

I'm trying to create a custom template using the Drupal Newsletter module.

I need to populate the newsletter with existing content. For this, I think I need to replace a token like [node:nid] in the newsletter body (which is created with CKEditor). However, I have been unsuccessful.

When I use the token filter module, I'm only able to replace global tokens like date or [site:url] and not tokens involving a node. Can someone please help me out?

  • Could you share the link the Drupal newsletter module. ? :) – Vic Sep 30 '13 at 10:03
  • This might work for you: Token Insert Edit: Module Page Description: This module allows you to insert tokens into a textarea. It supports both plain text and wysiwyg textareas. The format used for the insert is compatible with Token Filter. – NWOM Oct 22 '13 at 7:36
  • @Vic I believe he is referring to the Newsletter module. – NWOM Oct 22 '13 at 7:39
0

Tokens are contextual based on where they are used, so it's not possible to reference arbitrary content. If you can add fields to the newsletter, the ideal way to resolve this would be to add a node reference field, then create your tokens by doing something like [newsletter:field_node[0]:entity].

protected by kiamlaluno Nov 9 '18 at 14:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.