It would be nice to be able to theme the label.
IE: To create an autocomplete like:
prefix . label . (eid) => <strong>Entity Label</strong>, Some other property (eid)
Maybe replace
$matches[$prefix . $key] = '<div class="reference-autocomplete">' . $label . '</div>';
with
$matches[$prefix . $key] = $handler->prepareAutocompleteLabel($entity_id, $label);
class EntityReferenceHandler_base implements EntityReferenceHandler {
.....
public function prepareAutocompleteLabel($entity_id, $label) {
return '<div class="reference-autocomplete">' . $label . '</div>';
}
}
Of choose having the actual entity here would be even better, but reloading this should have minimal overhead with minimal coding changes required.
BTW, this is a very nice replacement for the old References module!
Comments
Comment #1
lsolesen commentedDid you solve your issue?