fixed version
here is proposed solution
kir lazur β created an issue.
here's updated version of patch
updated version with needs-data for token
here the latest version including tokens as well
Updated version of patch
Here is new version of patch with slight change to simplify displaying the value for current field using appropriate token.
Change highlight:
// We need special handling for the token destination type.
if ($destination_type == 'custom') {
$destination = $manager->replaceToken((is_array($destination) && isset($destination['custom']) ? $destination['custom'] : $destination), $replace_tokens, ['clear' => TRUE,<strong> 'field_name' => $field_name, 'delta' => $delta]</strong>);
It will allows to handle correct delta of current field with multiple values, like entity reference, with example token info like ['tokens']['current-field']['value']
if ($type == 'current-field' && $token == 'value' && isset($options['delta']) && isset($options['field_name'])) {
$replacements[$original] = $$data['node']->get($options['field_name'])->get($options['delta'])->target_id;
Kir Lazur β created an issue.
driverok β credited kir.lazur@gmail.com β .
Hi all,
thanks for contribution into this extension.
I'm agree with @ipinchuk, the full functionality of weight might be achieved with d&d on listing page, not only the field itself.