1

I am trying to use Rules to send an email with the results of the submission of a node. Is there any way to place the entire contents of the node using a token?

e.g. [node:teaser]

1 Answer 1

2

Look at the Advanced Entity Tokens module.

Advanced Entity Tokens (AET) Creates a Token for each of your entity items.

Through AET you can query the DB for entities using Tokens.

Examples

  • [aet:node:1] will return the 1st node with the token view mode (or full if token is not available).
  • [aet:file:1:view-original] will return the 1st file entity with the original view mode.
  • [aet:taxonomy_term:1:name] will return the 1st node title field (note that this level of chaining is done by the formal token implementation of the node entity in token/token.tokens.inc -> token_token_info()).

Real World Examples

  • Displaying a node inside a block: This could be done using Node Block OR you could insert a token inside a block you create through the Blocks interface that retrieves a certain node (or a property inside a node, [aet:node:] or [aet:node::body]) with no extra code.
  • Displaying a File Entity (image) inside a title field: I'm not sure how this could have been done without custom code, BUT with AET you could easily insert the Token for a specific File Entity ([aet:file:]) and your entity will be displayed. AET defaults to the Token view mode if available (full otherwise), but you could just as easily specify a view mode of your own ([aet:file::view-teaser]).
  • I'm saving this spot for real life examples other Drupal users had (or thought of having) for this module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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