I have a set of nodes, some of which are just a title, while others have body and other content.
I'm trying to create a view, which lists the node titles. If the body of the node contains content, the title should link to the node, but if the node body is empty, it should just display the title as plain text.
I think I can achieve this by rewriting the title field in the view with TWIG.
I've got it working so it detects the body and displays a link, but I'm not sure what to put for "url" in the link.
{% if body|render|trim is not empty %}
<a href="{{ url }}">{{ title }}</a>
{% else %}
{{ title }}
{% endif %}
How can the TWIG code get the url of the node to link to?