Answers.Body: <p>Instead of using <code>{% if page.pageIntroText|length %}</code> have you tried </p>
  
  <p><code>{% if page.pageIntroText is not empty %}</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T19:47:57.600Z
Answers.Text: Thanks for your suggestion...  it didn't work.  I now have this: 
          {% nav page in subnav  %}
            <li>
              {% if page.pageIntroText is not empty %}
                <a href="{{ page.url }}">{{ page.title }}</a>
              {% else %}
              {{ page.title }}
              {% endif %}
            </li>
          {% endnav %}
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T19:50:49.120Z
Answers.Text: Bizarre!  I've just tried using a different field for the conditional and it's worked fine???
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T20:04:18.307Z
Answers.Text: What type of input is *pageIntroText*? I assumed it was Plain or Rich Text.
Answers.UserDisplayName: a-am
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-28T04:32:24.963Z
Answers.Text: I'm an idiot! I have two fields, pageIntroText and practiceIntroText, this section is querying practiceIntroText.  Thanks for your help :/
Answers.UserDisplayName: Martin
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-27T15:15:17.497Z
Answers.LastActivityDate: 2015-10-27T15:31:21.873Z
Answers.LastEditDate: 2015-10-27T15:31:21.873Z
Answers.UserDisplayName: a-am
Body: <p>I'm using <a href="https://craftcms.stackexchange.com/questions/11443/show-only-children-of-current-page-in-submenu">this solution</a> 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.</p>
  
  <p>I'm trying the following</p>
  
  <pre><code>{% 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 %}
  </code></pre>
  
  <p>.. but it removes the anchor regardless of whether there is any content in pageIntroText field?</p>
  
  <p>Any ideas?</p>
  
  <p>Many thanks</p>
  
  <p>Martin</p>
  
Tags: <conditional><children>
Title: Remove the anchor in nav loop based on another field conditional
ThreadText: # Remove the anchor in nav loop based on another field conditional
  
  (Asked by: username_0 on 2015-10-27)
  
  I'm using [this solution](https://craftcms.stackexchange.com/questions/11443/show-only-children-of-current-page-in-submenu) 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 %}
    <li>{% if page.pageIntroText|length %}<a href="{{ page.url }}">{%endif%}{{ page.title }}{% if page.pageIntroText|length %}</a>{%endif%}</li>
    {%else%}
    <li class="current-page">{{ page.title }}</li>{%endif%}
  {% endnav %}
  
  ```
  
  .. but it removes the anchor regardless of whether there is any content in pageIntroText field?
  
  Any ideas?
  
  Many thanks
  
  username_0
  
  **Tags:** conditional, children
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-27. Score: 1
  
  Instead of using `{% if page.pageIntroText|length %}` have you tried
  
  `{% if page.pageIntroText is not empty %}`
  
  > **Comments:**
  > **username_0**: Thanks for your suggestion...  it didn't work.  I now have this:          {% nav page in subnav  %}           <li>             {% if page.pageIntroText is not empty %}               <a href="{{ page.url }}">{{ page.title }}</a>             {% else %}             {{ page.title }}             {% endif %}           </li>         {% endnav %}  
  > **username_0**: Bizarre!  I've just tried using a different field for the conditional and it's worked fine???  
  > **username_1**: What type of input is *pageIntroText*? I assumed it was Plain or Rich Text.  
  > **username_0**: I'm an idiot! I have two fields, pageIntroText and practiceIntroText, this section is querying practiceIntroText.  Thanks for your help :/  
  
  ---
  
  