So I'm preprocessing a field: preprocess_field
and trying to add attributes to a Link. I've tried:
$variables['items'][0]['attributes']['target'] = '_blank';
$variables['attributes']['target'] = '_blank';
$variables['#attributes']['target'] = '_blank';
$variables['content_attributes']['target'] = '_blank';
$variables['content_attributes']['attributes']['target'] = '_blank';
$variables['items'][0]['#attributes']['target'] = '_blank';
$variables['items'][0]['options']['attributes']['target'] = '_blank';
$variables['items'][0]['#options']['attributes']['target'] = '_blank';
$variables['items'][0]['#options']['target'] = '_blank';
$variables['items'][0]['#content']['#options']['attributes']['target'] = '_blank';
$variables['items'][0]['#content']['options']['attributes']['target'] = '_blank';
$variables['items'][0]['#options']['attributes']['target'] = '_blank';
A silly amount of attempts, none of these worked. How can I add attributes to a link?