Answers.Body: <p>You can check against the Entry Type as well. 
  I would try to validate it with something like:</p>
  
  <pre><code>{% set exclusions = ['home'] %}    
  {% if entry.type not in exclusions %}
  ....
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-02-26T04:10:07.183Z
Answers.LastActivityDate: 2018-02-26T04:19:11.693Z
Answers.LastEditDate: 2018-02-26T04:19:11.693Z
Answers.UserDisplayName: Jon Tastemel
Body: <p>I'm currently trying to make my navigation be not included on my index page due to my loading a different style of page - but - include it on every other page. My current layout looks like so:</p>
  
  <p><strong>_layout.html</strong></p>
  
  <pre><code>{% set exclusions = ['index'] %}
  {% if craft.request.firstSegment not in exclusions  %}
      {% include '_navigation' %}
  {% endif %}
  </code></pre>
  
  <p>But this seems to not work on my <strong>"index.html"</strong> page. Do I need to set it a title? or set an exclusion name here?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-25T16:51:28.320Z
Comments.Text: Is the first segment blank by chance? If so you can check if it’s empty.
Comments.UserDisplayName: Shift2Design
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-25T17:10:52.153Z
Comments.Text: I'm not sure, I'm just trying to exclude this template when on the index page
Comments.UserDisplayName: JMKelley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-25T18:39:07.470Z
Comments.Text: This will only work if your first url segment is 'index' so when your url is `www.example.com/index` it won't work for `www.example.com`. Do you have different templates for you first page and for the rest of them?
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-25T20:36:50.993Z
Comments.Text: @RobinSchambach I have a _layout.html include on the index page and within layout is navigation.html
Comments.UserDisplayName: JMKelley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-25T20:39:21.977Z
Comments.Text: This doesn't answer my question. Do you use the template you use for your `index` page for any other page?
Comments.UserDisplayName: Robin Schambach
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-25T20:40:02.853Z
Comments.Text: @RobinSchambach Yes, It's my main _layout file, it's included on every page.
Comments.UserDisplayName: JMKelley
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-02-25T20:43:09.550Z
Comments.Text: I don't mean your layout file... When you set a bool variable to true in your index template and ask in your layout if the variable is defined and true. Would that work or do you use your index template for other entries too?
Comments.UserDisplayName: Robin Schambach
Tags: <blocks><layout>
Title: Exclude a block from appearing on a specific page
ThreadText: # Exclude a block from appearing on a specific page
  
  (Asked by: username_0 on 2018-02-25)
  
  I'm currently trying to make my navigation be not included on my index page due to my loading a different style of page - but - include it on every other page. My current layout looks like so:
  
  **\_layout.html**
  
  ```
  {% set exclusions = ['index'] %}
  {% if craft.request.firstSegment not in exclusions  %}
      {% include '_navigation' %}
  {% endif %}
  
  ```
  
  But this seems to not work on my **"index.html"** page. Do I need to set it a title? or set an exclusion name here?
  
  **Tags:** blocks, layout
  
  > **Comments:**
  > **username_1**: Is the first segment blank by chance? If so you can check if it’s empty.  
  > **username_0**: I'm not sure, I'm just trying to exclude this template when on the index page  
  > **username_2**: This will only work if your first url segment is 'index' so when your url is `www.example.com/index` it won't work for `www.example.com`. Do you have different templates for you first page and for the rest of them?  
  > **username_0**: @username_2 I have a _layout.html include on the index page and within layout is navigation.html  
  > **username_2**: This doesn't answer my question. Do you use the template you use for your `index` page for any other page?  
  > **username_0**: @username_2 Yes, It's my main _layout file, it's included on every page.  
  > **username_2**: I don't mean your layout file... When you set a bool variable to true in your index template and ask in your layout if the variable is defined and true. Would that work or do you use your index template for other entries too?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2018-02-26. Score: 2 | Accepted answer
  
  You can check against the Entry Type as well.
  I would try to validate it with something like:
  
  ```
  {% set exclusions = ['home'] %}    
  {% if entry.type not in exclusions %}
  ....
  
  ```
  
  
  ---
  
  