Inside TWIG Template, how to determine if a paraph is empty or not I have a paragraph called "Square cta" that I'm using like an old field collection.  It has 2 fields in it - a text field (field_cta_text), and an Image (field_square_cta_image).

I have a content type called "Show Page" in which I will upload an image and put in the cta text for.

I then have a view that shows all of the show pages and I reference the square_cta in my template - node--view--seasons.html.twig - like so

&lt;a href="{{ url }}"&gt;{{ content.field_square_cta }}&lt;/a&gt;


This works great for displaying the image inside the field_square_cta for the show and it acting as a link back to the Show Page node it's in.

Where I am having trouble, is not all shows have the field_square_cta populated.  For those show pages, I want to just display the of the node instead.  I have been unable to figure out how to write my if logic to determine if the field_square_cta is undefined.  

Here is what I was trying to do:

{%  if content.field_square_cta %}
  &lt;a href="{{ url }}"&gt;{{ content.field_square_cta }}&lt;/a&gt;
{%  else %}
  &lt;h1&gt;&lt;a class="title" href="{{ url }}"&gt;{{ label }}&lt;/a&gt;&lt;/h1&gt;
{% endif %}


The conditional is always going with the if, never the else, even when I don't have any data inside the content.field_square_cta.  I have been unable to determine the proper syntax for checking if that is empty or not.

Any help would be greatly appreciated.
Better use the node object to check whether the field is not empty:

{% if not node.field_example.isempty %}