I tried v. 7.x , and want use my field called 'surname' in node's title.
I've tried it in way what is described in readme, but it isn't work.
Maybe it is problem token module, I don't know.

Comments

jcarlson34’s picture

Status: Active » Fixed

Yes this is an issue with Token and not Automatic Nodetitles. Check out this thread for your answers and updates: #691078: Field tokens

Field tokens aren't available in the Drupal 7 Token module yet and the patch at the above thread only supports a few types of field tokens right now. Hopefully the rest will be supported soon.

Also: after installing the token patch, clear your cache to see the fields show up for Automatic Nodetitles.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mikeker’s picture

Just a quick note, since it seems that #691078: Field tokens is stalled waiting for review, that the $node variable is available if tick "Evaluate PHP in pattern". That let's you do something like this:

$budget_num = $node->field_budget_number['und'][0]['value'];
$budget_desc = $node->field_budget_description['und'][0]['value'];
if (!empty($budget_desc)) {
  return "$budget_num ($budget_desc)";
}
else {
  return $budget_num;
}

until tokens and fields gets straightened out...

danepowell’s picture

Title: How use fields token in Automatic Nodetitles » Field tokens unavailable
Status: Closed (fixed) » Postponed

This isn't really fixed, just waiting on the resolution of that other issue... it's a fairly big issue so I think it should stay open, and perhaps a disclaimer should be added to the ANT project page that Token integration is not fully functioning in D7.

sunketh’s picture

fago’s picture

you can also use the entity tokens module of http://drupal.org/project/entity
It has no support for multiple-value fields yet, though : see #1058856: Entity tokens not created for multi-value fields

aaron’s picture

subscribe

jcarlson34’s picture

As stated by webchick in commet 1 of #691078: Field tokens, you can also use the Taxonomy Entity Index module now (located at http://drupal.org/project/taxonomy_entity_index) for basic field token support until the token module field tokens patch is ready.

zilverdistel’s picture

subscribing

nmc’s picture

subscribing

ownage’s picture

Has anyone figured out how to use Field Tokens with Automatic Node Titles using the Field Tokens patch?

I am freaking out. I've installed the patch, and inserting the tokens, (say last name for instance), [node:field-last-name] INSERTS JUST THAT into the title.

The only thing that has affected this is this non-working patch:
http://drupal.org/node/1123266

Which instead of inserting the actual token as the title, then inserts blank nothingness for the title.

Anyone have some advice?

zilverdistel’s picture

@ownage: You could implement hook_tokens() and hook_token_info() to provide the tokens you need.

It doesn't seem likely http://drupal.org/node/691078 will be resolved all too soon.

mikeker’s picture

@ownage, see my comment in #3. You have full access to the node object if you use PHP and should be able to get at any Field entity.

jcarlson34’s picture

Tokens beta 4 now has basic token support. Also check out this post about adding tokens: http://drupal.org/node/1252608

tdous’s picture

edit: Found the answer to my crap question. Nothing too interesting to anyone else so taking this out.

manish-31’s picture

Issue summary: View changes

Please use current version of token module, all the field tokens are available. To view or use field tokens click on the link "Browse available tokens" and look for the field.

manish-31’s picture

Status: Postponed » Active
gaurav.kapoor’s picture

Status: Active » Closed (outdated)