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:<nid>]or[aet:node:<nid>: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:<fid>]) 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:<fid>:view-teaser]). - Using taxonomy to manage your images and then using AET &
token_filterto print it in various text fields. - I'm saving this spot for real life examples other Drupal users had (or thought of having) for this module.
AET Insert
This feature is only available in the Drupal 7 version. If you'd like to see it come back in Drupal 8+, please create an issue (and ideally provide a patch).
- AET Insert is a UI tool built to allow content managers to use AET tokens.
- After enabling the module you will need to navigate to any text field edit page
and click the AET Insert checkbox. - The AET Insert field adds a very simple filtering for AET.
Installing
- Download the AET module file below.
- Unpack it in your modules folder.
- Enable the AET module in your Drupal site.
- Enter one of the above examples in a Token supported field (I suggest installing Token Filter to enable token filtering in general text fields).
Required Modules
Recommanded Modules
Known Issues
- Stability
Please see #3162284: Stable release roadmap. - Entity Recursion
Recursion is always a risk when writing a module such as mine. I think I handled all of the recursion issues (tested against the page being viewed & the function backtrace). Of course the more installs & tests this module receives the better it gets.
Supporting organizations:
Refactoring for Drupal 8+, maintenance and new features
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.- Project categories: Content editing experience, Developer tools
- Ecosystem: Token
493 sites report using this module
- Created by eyal shalev on , updated
Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.

