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 don't seem to be able to use the bean type as a token.
I am using the entity tokens module.
Currently I am trying to use filefield_paths with bean tokens.
Comments
Comment #1
DamienMcKennaComment #2
Kristen Pol@rooby - How did you do this with entity token? We are having trouble scoping the token properly. Can you give an example?
Comment #3
Kristen PolNevermind... it works with entity tokens module like:
Note this is via using Display Suite extras.
Comment #4
aimeeraeFor filefield_paths field configs:
1. Open the Replacement Patterns section
2. Expand blocks <-- I missed this at first, too, expecting to see bean but they ARE blocks so it makes perfect sense in retrospect ;-)
3. You'll see all the available field tokens you have available for your bean.
syntax, is just like for nodes - essentially:
[
bean: = entity type (like node)
field-name-as-you-would-with-node: in our case we used dashes
token-output-format (like you see on the pathauto token page or any of the other replacement patterns that exist)
]
[bean:field-spotlight-link:url]
Comment #5
rooby CreditAttribution: rooby commentedI didn't do it.
I wanted to use the bean type but it wasn't available as a token so I couldn't.
I haven't had the need to use any other bean tokens.
Comment #6
Kristen Pol@rooby - AH! Now I understand your issue... it's the bundle/type not the entity that you are looking for... e.g. create a bean type of cool_beans and you want to scope your token based on that (cool_beans). We didn't need to do that as we just needed it across any beans with the particularly field.
Comment #7
Kristen PolObviously this never happened... closing this 7 years later o_O