Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am trying to make the tokens of Entity refrence field in custom field of Display Suite.
Basically i wanted to display fields of referenced entity individually rather then Rendered entity, so I added a Code field in DS with tokens and php. But when i use a token of my enityrefrence nothing returns and when i try to use token of fields of ER token return itself [node:field-artist:field-artforma].
Plz tell me if I am doing something wrong or alternative mechanism for same.
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedI can use the tokens in a DS Code field. However, it doesn't let me access any properties on the referenced entity - only the entity itself, and that just renders the title of the referenced entity. I need to be able to access properties of the entity such as its title and author.
Comment #2
lsolesen CreditAttribution: lsolesen commentedIs this still an issue?
Comment #3
mp CreditAttribution: mp commentedhi and it seems yes
i entered in the field "Field code" the token [profile2:field_first_name] and nothing happend
can i use a token from a profile2 profile in a code field of display suite at a content type?
greets