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:
<a href="????">
<h3>{{ content.top_region|striptags}}</h3>
<p>{{ content.middle_region }}</p>
</a>
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:
<a href="{{ url }}">
<a href="{{ uri }}">
<a href="{{ node.id }}">
<a href="{{ link }}">
<a href"{{ content.field.0['#url'] }}">
The following allows me to manually specify the node id in twig however that's not what I am looking for:
<a href="{{ path('entity.node.canonical', {'node': 6 }) }}">
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?