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

DamienMcKenna’s picture

Title: No bean type token » Add a token for the bean type (bundle)
Category: bug » feature
Kristen Pol’s picture

@rooby - How did you do this with entity token? We are having trouble scoping the token properly. Can you give an example?

Kristen Pol’s picture

Nevermind... it works with entity tokens module like:

[bean:field-spotlight-link:url]

Note this is via using Display Suite extras.

aimeerae’s picture

For 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]

rooby’s picture

I 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.

Kristen Pol’s picture

@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.

Kristen Pol’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Obviously this never happened... closing this 7 years later o_O