Please use entity tokens instead of just node tokens.
FileField Paths code:

      $entity_info = entity_get_info($form['#instance']['entity_type']);

      // Replacement patterns for field.
      $field_data['form_path']['token_tree'] = array(
        '#type' => 'fieldset',
        '#title' => t('Replacement patterns'),
        '#collapsible' => TRUE,
        '#collapsed' => TRUE,
        '#description' => theme('token_tree', array('token_types' => array('file', $entity_info['token type']))),
        '#weight' => 10,
Members fund testing for the Drupal project. Drupal Association Learn more


eosrei’s picture

Category: bug » feature

I'll look into this soon. Thanks

eosrei’s picture

Project: » ImageField Tokens
Version: » 7.x-1.x-dev
Assigned: Unassigned » eosrei

Code has moved to ImageField Tokens 7.x, moving issues also.

Mikhail K.’s picture

Priority: Normal » Major
Issue summary: View changes

Any progress on this issue?

Mikhail K.’s picture

Assigned: eosrei » Unassigned
Status: Active » Needs review
3.66 KB

Marked #1937040: Taxonomy term tokens are not provided as duplicate of this issue.

Please test attached patch.

I think we also need to add dependencies on Token and Entity modules in

dependencies[] = token
dependencies[] = entity

and then remove calls of module_exists().
But I think it should be done in another issue.

Anybody’s picture

Looks and works great. Any further progress on this?

interdruper’s picture

Status: Needs review » Reviewed & tested by the community

#4 works great for me.

Anybody’s picture

@Module maintainer: Could you add this to the dev version?

yogaf’s picture

Title: Use entity tokens » Use entity tokens RTBC

Yep, It's working.
@Deciphered Please commit - limit tokens just to nodes is not really an option these days.

maximpodorov’s picture

Thanks for the patch!

jidrone’s picture

I used the patch on commerce products and it works perfect.

cosolom’s picture

It works for me. Thanks!

kthull’s picture

Thanks for the patch! Worked perfectly for auto-filling the product title in the image field.

yogaf’s picture

Title: Use entity tokens RTBC » Use entity tokens RTBC Please!!!
colan’s picture

Title: Use entity tokens RTBC Please!!! » Use entity tokens

Please stop overloading titles to get maintainers' attention. The only effect this has is to spam everyone watching the issue. Instead, use their contact forms to e-mail them if they don't respond in a desired amount of time.