Answers.Body: <p>I ran into the same problem where if a page was 'disabled', I didn't want it to show in my footer navigation. The recommended answer didn't work for me. The link still showed up. The following worked:</p>
  
  <pre><code>{% set myEntry = craft.entries.id(entryId).first() %}
  
  {% if myEntry %}
      &lt;li&gt;&lt;a href="example.com"&gt;Example&lt;/a&gt;&lt;/li&gt;
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-16T17:40:56.647Z
Answers.LastActivityDate: 2018-02-16T17:40:56.647Z
Answers.UserDisplayName: Jeff Irwin
Answers.Body: <p>You can check the status of an entry with <code>.status</code>. <a href="https://craftcms.com/docs/templating/craft.entries#status" rel="noreferrer">https://craftcms.com/docs/templating/craft.entries#status</a></p>
  
  <p>This code should work!</p>
  
  <pre><code>{% set jobsEntry = craft.entries.id(jobsId) %}
  
  {% if jobsEntry.status == 'live' %}
      &lt;a href="{{ jobsEntry.url }}"&gt;Jobs&lt;/a&gt;
  {% else  %}
      Jobs is disabled
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-03T18:17:21.987Z
Answers.Text: Thanks! The code definitely works, but my link still shows even though I disabled the entry. And the page still shows up even though the entry's status is disabled. I thought marking it as 'disabled' would at least not let it show in the browser.
Answers.UserDisplayName: kingkelly
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-05T11:22:24.377Z
Answers.Text: That sounds strange – when you specifically ask only for entries that are `live`, it shouldn't show entries that are `disabled`. Do you have any active caching going on?
Answers.UserDisplayName: KSP
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-03T17:27:38.250Z
Answers.LastActivityDate: 2017-11-03T17:27:38.250Z
Answers.UserDisplayName: Jake Dohm
Body: <p>I'd like to show a 'Jobs' link in my navigation only if the Jobs page is enabled. Is there a way for craft to detect if the page is enabled, and show a div?</p>
  
Tags: <conditional><status>
Title: If page is enabled, show div
ThreadText: # If page is enabled, show div
  
  (Asked by: username_0 on 2017-11-03)
  
  I'd like to show a 'Jobs' link in my navigation only if the Jobs page is enabled. Is there a way for craft to detect if the page is enabled, and show a div?
  
  **Tags:** conditional, status
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-11-03. Score: 6 | Accepted answer
  
  You can check the status of an entry with `.status`. <https://craftcms.com/docs/templating/craft.entries#status>
  
  This code should work!
  
  ```
  {% set jobsEntry = craft.entries.id(jobsId) %}
  
  {% if jobsEntry.status == 'live' %}
      <a href="{{ jobsEntry.url }}">Jobs</a>
  {% else  %}
      Jobs is disabled
  {% endif %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks! The code definitely works, but my link still shows even though I disabled the entry. And the page still shows up even though the entry's status is disabled. I thought marking it as 'disabled' would at least not let it show in the browser.  
  > **username_3**: That sounds strange – when you specifically ask only for entries that are `live`, it shouldn't show entries that are `disabled`. Do you have any active caching going on?  
  
  ---
  
  ### Answer by username_1 on 2018-02-16. Score: 2
  
  I ran into the same problem where if a page was 'disabled', I didn't want it to show in my footer navigation. The recommended answer didn't work for me. The link still showed up. The following worked:
  
  ```
  {% set myEntry = craft.entries.id(entryId).first() %}
  
  {% if myEntry %}
      <li><a href="example.com">Example</a></li>
  {% endif %}
  
  ```
  
  
  ---
  
  