Drupal 8 - how do I extrat the URL path from node title I can print title of my content-type using {{ fields.title.content }}. and it renders like &lt;a href='...'&gt;Title of the content&lt;/a&gt;. I have created a View (view mode: field) and showing a list of available products on that page. To customize look and feel of the page I copied views-view-fields.html.twig file from core/themes/stable/template/views under my theme's template directory and customized it the following way.

&lt;div class="col-md-2 col-sm-2 col-xs-12"&gt;
    &lt;div class="box-gray-border-only border-radius-5 padd-all-5"&gt;
        {{ fields.field_product_image.content }}
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class="col-md-10 col-sm-10 col-xs-12"&gt;
    &lt;h3 class="item-list-title-anchor margin-auto larger"&gt;{{ fields.title.content }}&lt;/h3&gt;
    &lt;p class="margin-t10 small"&gt;{{ fields.field_product_summary.content|striptags|convert_encoding('UTF-8', 'HTML-ENTITIES') }}&lt;/p&gt;
&lt;/div&gt;
&lt;div class="clearfix"&gt;&lt;/div&gt;
&lt;div class="row"&gt;
    &lt;div class="col-md-12 col-sm-12 col-sx-12 text-right"&gt;
        &lt;span&gt;{{ fields.field_category.content }}&lt;/span&gt;&amp;nbsp;|&amp;nbsp;
        &lt;span&gt;&lt;b class="text-red"&gt;Price: {{ fields.field_product_price.content }}&lt;/b&gt;&lt;/span&gt;&amp;nbsp;
        &lt;a title="{{ fields.content.title }}" class="btn btn-warning" href="{{ path('entity.node.canonical', { 'node' : node.id}) }}"&gt;View &amp;raquo;&lt;/a&gt;
    &lt;/div&gt;
    &lt;div class="clearfix"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class="margin-t20"&gt;&lt;/div&gt;
&lt;hr /&gt;


The title itself is linked to product's page. But I have an additional View button which I want to link to the product page separately as well. In order to accomplish the same I tried to extract the URL part from the title with {{ path('entity.node.canonical', { 'node' : node.id}) }}. But it gives me the following error message.


  Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "node" for route "entity.node.canonical" must match "\d+" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 193 of core\lib\Drupal\Core\Routing\UrlGenerator.php).


I am referring to this article:
https://chromatichq.com/blog/creating-links-within-twig-templates-using-path-and-url

What I did wrong?

This is what I want to achieve:



I used {{ dump(fields.title.content) }} to see if I the URL could be accessible, but there was nothing like it.
Try {{ path('entity.node.canonical', { 'node' : row.nid}) }}. Also it is better to use kint or devel_dump for twig debug.