Closed (duplicate)
Project:
Token
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2015 at 01:59 UTC
Updated:
28 Aug 2017 at 01:50 UTC
Jump to comment: Most recent
Comments
Comment #2
damienmckennaMoving this to the Token queue.
Comment #3
ryan.armstrong commentedThanks Damien! I didn't realize this was an issue with Tokens rather then Metatag.
Comment #4
matthew3k commentedI had the same question, ryan.armstrong.
I discovered enabling the "Entity token" module, part of the Entity API project, supports this. Now when I browse the available tokens list there is: [node:field-some-field:?] where the question mark can be replaced with the desired property, text or summary.
Note the underscores are now hyphens when appending properties. So the token for the summary of "field_some_field" is:
[node:field-some-field:summary]
Comment #5
thoughtcat commentedI want to auto-generate the title of a node from the first few words of the body text ("long text" field type). The token help for the field says "The following properties may be appended to the token: value (Text), format (Text format)". I've tried the format [node:field-some-field:summary] per matthew3k's comment but the title field remains blank. Do I have to manually define the "summary" value of my field somewhere? I also don't know what "value (Text)" means. If I leave the token at the default [node:field-some-field:?] then the title field is populated by the content type's machine name for some reason.
Comment #6
damienmckennaThis is ultimately a problem in core: #1671420: If no body field, [node:summary] [node:body] etc tokens are not replaced