Remove the anchor in nav loop based on another field conditional I'm using this solution to output the children within a current structure entry.  Unfortunately I need to take out the anchor on some entries that don't yet have content, but still include the (unlinked) title.

I'm trying the following

{% nav page in subnav  %}
  {% if page.id != entry.id %}
  &lt;li&gt;{% if page.pageIntroText|length %}&lt;a href="{{ page.url }}"&gt;{%endif%}{{ page.title }}{% if page.pageIntroText|length %}&lt;/a&gt;{%endif%}&lt;/li&gt;
  {%else%}
  &lt;li class="current-page"&gt;{{ page.title }}&lt;/li&gt;{%endif%}
{% endnav %}


.. but it removes the anchor regardless of whether there is any content in pageIntroText field?

Any ideas?

Many thanks

Martin
Instead of using {% if page.pageIntroText|length %} have you tried 

{% if page.pageIntroText is not empty %}