How to print the relative url or node id for each referenced node in twig? I am using paragraphs to render a number of nodes on a page. The nodes are obtained through an entity reference field called 'field_nodeslist' in my cards paragraph type. The cards are then rendered using a custom view layout.

Here is a snippet of my view layout: 

&lt;a href="????"&gt;
   &lt;h3&gt;{{ content.top_region|striptags}}&lt;/h3&gt;
   &lt;p&gt;{{ content.middle_region }}&lt;/p&gt;
&lt;/a&gt;


The problem I am having is printing the relative path for each referenced node. I have tried the following twig commands but have not had any success so far:

&lt;a href="{{ url }}"&gt;
&lt;a href="{{ uri }}"&gt;
&lt;a href="{{ node.id }}"&gt;
&lt;a href="{{ link }}"&gt;
&lt;a href"{{ content.field.0['#url'] }}"&gt;


The following allows me to manually specify the node id in twig however that's not what I am looking for:

&lt;a href="{{ path('entity.node.canonical', {'node': 6 }) }}"&gt;


Any ideas?

Notes/Thoughts: In my first code snippet, the fields in 'top_region' just contains the nodes title. There was an option to link the field to content however I had to add the '|striptag' filter in twig due to additional markup messing up the style. Is it possible to grab the url path from the node title?
You probably need to work more in UI to configure what is in {{ content }} and then render the fields as they are.

If still necessary you can use {{ node }} respectively {{ paragraph }} to access all field values, see How to retrieve value of hidden field in twig?, but you can't access the url directly. You have to build this with the help of the raw database value target id, see How to print the URL path of a referenced node using paragraphs?.

BTW the result is the same as the entity method toUrl() would provide, only that this method is blocked by the twig sandbox policies. As a third (least favourable) option you can change this, too, see https://stackoverflow.com/questions/40091324/allow-new-methods-in-sandbox-policy-in-twig-drupal-8