How to get current path for user profile field?
One way to go about this is a theme override of the user profile page:


Copy over core/modules/user/templates/user.html.twig over to your theme's template directory.
Have your theme implement template_preprocess_user() in your MYTHEME.theme file to inject a custom URL variable.
Modify your theme's user.html.twig to contain the HTML for the link.


For example, in your MYTHEME.theme:

use Symfony\Cmf\Component\Routing\RouteObjectInterface;
use Drupal\Core\Url;

/**
 * Implements hook_preprocess_user() for user.html.twig.
 */
function MYTHEME_preprocess_user(&amp;$variables) {
  if (\Drupal::request()-&gt;get(RouteObjectInterface::ROUTE_NAME) == 'entity.user.canonical') {
    $variables['view_page_path'] = Url::fromUri('base:' . \Drupal::service('path.current')-&gt;getPath())-&gt;toString() . '/view-page';
  }
}


In your user.html.twig:

{% if view_page_path %}
  &lt;a href="{{ view_page_path }}"&gt;MY VIEW PAGE&lt;/a&gt;
{% endif %}