2

I have setup auto entity label with tokens. All works great. Lets say I have a title e.g. tokens [firstname] [lastname]

Displayed as: Tom Cruise

But if there are multiple identical titles named "Tom Cruise". e.g.

node 65: Tom Cruise
node 90: Tom Cruise
node 23: Tom Cruise

What I want is it to validate, the title is not unique therefore add number on the end.

node 65: Tom Cruise
node 90: Tom Cruise 1
node 23: Tom Cruise 2

Or something like that. I have been using nid / serial field to make them unique but that isn't what I need.

0

You can add node id to the label. It will make labels unique anyway. For example

[node:field_first_name] [node:field_last_name] #[node:nid]

Please note, that there is an issue in module that prevents [node:nid] token from working. https://www.drupal.org/project/auto_entitylabel/issues/2920695

But there is simple patch available in this issue to fix this. So this should be resolved soon I hope. Until that you need to apply patch manually. https://www.drupal.org/files/issues/2018-11-11/auto_entitylabel-support_entity_id-2920695-31.patch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.