If you inspect with `$variables['items'][0]['content']` with [Devel][1] kint kint($variables['items'][0]['content']); [![enter image description here][2]][2] > But it doesn't work and I think it's because by the time I get to that > point, Drupal has already used the uri for the #title. Correct, so all you gotta do is check if the title is equal to the url utilizing [Url::toString](https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Url.php/function/Url%3A%3AtoString/8.2.x). if ($variables['field_name'] == 'field_event_location_link') { $link_url = $variables['items'][0]['content']['#url']->toString(); if ($variables['items'][0]['content']['#title'] == $link_url) { $variables['items'][0]['content']['#title'] = 'Location'; } } [1]: https://www.drupal.org/project/devel [2]: https://i.sstatic.net/GAiVo.png