Field collection Tokens
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
UNSUPPORTED - NO FURTHER DEVELOPMENT
This module allows administrators to define custom tokens for any field_collection fields on their nodes.
The 'token' display mode is used for rendering subsituted field_collection fields. Rendering falls back to 'default' display mode if 'token' mode is not used.
Best used together with token_filter so users can use tokens in textareas to target field_collection values.
NOTE: This module is fresh out of the sandbox and still under heavy development. Use with caution and please provide feedback if things don't seem to go as planned.
Dependencies
Recommended
Configuration
On admin/structure/field-collections/tokens, a token field is available for every defined field_collection field. Just add custom token names and save.
Example scenario
- field_example is a field_collection field, added to node type Article
- token_filter is installed and 'substitute tokens' is added to 'full_html' input type
- on admin/structure/field-collections/tokens, filter [example] is defined for 'field_example'
- on an Article node, filter [example:1] is added to the body
- on an Article node, filter [example:2] is added to the body
- on an Article node, filter [example:all] is added to the body
Result
When the article is displayed, the first two tokens will be replaced by the example field_collection's first and second values. The third token will be replaced by all the values.
