Answers.Body: <p>Found a solution, I needed: <code>{% if entry.hasDescendants() %}</code></p>
  
  <pre><code>{% if entry.hasDescendants() %}
  
      &lt;div class="section bg-pattern"&gt;
          &lt;div class="inner"&gt;
              &lt;div class="col-24 gutter-bottom--half "&gt;
                  &lt;h3&gt;Available {{ entry.title }}&lt;/h3&gt;
  
                  {% for entry in craft.entries.section('yourAdventures').descendantOf( entry.id).find() %}
  
                      ...
  
                  {% endfor %}
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-07T16:36:00.923Z
Answers.LastActivityDate: 2017-02-08T00:42:50.180Z
Answers.LastEditDate: 2017-02-08T00:42:50.180Z
Answers.UserDisplayName: sarah3585
Answers.Body: <p>If I figured out correctly what you want to do - this should do the trick:</p>
  
  <pre><code>{% if entry.children | length  %}
  
      &lt;div class="section bg-pattern"&gt;
          &lt;div class="inner"&gt;
               &lt;div class="col-24 gutter-bottom--half"&gt;
  
                  &lt;h3&gt;Available {{ entry.title }}&lt;/h3&gt;
  
                  {% for child in entry.children %}
                      &lt;p&gt;{{ child.title }}&lt;/p&gt;
                  {% endfor %}
  
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
  {% endif %}
  </code></pre>
  
  <p><a href="https://craftcms.com/docs/templating/entrymodel#children" rel="noreferrer"><code>entry.children</code></a> is an alias for <a href="https://craftcms.com/docs/templating/entrymodel#getDescendants" rel="noreferrer"><code>entry.getDescendants(1)</code></a> which returns <a href="https://craftcms.com/docs/templating/elementcriteriamodel" rel="noreferrer"><code>ElementCriteriaModel</code></a></p>
  
  <hr>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-06T11:37:30.220Z
Answers.Text: Thanks for the reply. This is returning the child of the top level entry when in fact I need the second level down. I'll update my question with my entry structure as I see I've not been very clear.
Answers.UserDisplayName: sarah3585
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-02-04T21:37:54.303Z
Answers.LastActivityDate: 2017-02-04T21:37:54.303Z
Answers.UserDisplayName: Krzysztof Boduch
Body: <p>I'm pulling in entries which are the descendant of the current entry id.</p>
  
  <p>This is an example of my structure: Your Adventure > Honeymoon > A trip entry.</p>
  
  <p>The below code is being used on the Honeymoon entry to list any trip entries that are children of the current page.</p>
  
  <p>The below code is working fine apart from the if statement I'm wrapping it all in as I don't want any of the wrapping divs if there are no child pages within 'Honeymoon Trips'.</p>
  
  <pre><code>{% if entry in craft.entries.section('yourAdventures').descendantOf(entry.id)  %}
  &lt;!-- This is wrong --&gt;
  
  &lt;div class="section bg-pattern"&gt;
      &lt;div class="inner"&gt;
           &lt;div class="col-24 gutter-bottom--half "&gt;
              &lt;h3&gt;Available {{ entry.title }}&lt;/h3&gt;
              {% for entry in craft.entries.section('yourAdventures').descendantOf( entry.id).find() %}
  
              ...
  
              {% endfor %}
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  {% endif %}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-02-04T20:40:58.293Z
Comments.Text: Not sure I understand your question, but you probably just need to change your `{% if %}{% endif %}` to [`{% for %}{% endfor %}`](http://twig.sensiolabs.org/doc/2.x/tags/for.html)?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Tags: <entries><children>
Title: Check if child entries exists
ThreadText: # Check if child entries exists
  
  (Asked by: username_0 on 2017-02-04)
  
  I'm pulling in entries which are the descendant of the current entry id.
  
  This is an example of my structure: Your Adventure > Honeymoon > A trip entry.
  
  The below code is being used on the Honeymoon entry to list any trip entries that are children of the current page.
  
  The below code is working fine apart from the if statement I'm wrapping it all in as I don't want any of the wrapping divs if there are no child pages within 'Honeymoon Trips'.
  
  ```
  {% if entry in craft.entries.section('yourAdventures').descendantOf(entry.id)  %}
  <!-- This is wrong -->
  
  <div class="section bg-pattern">
      <div class="inner">
           <div class="col-24 gutter-bottom--half ">
              <h3>Available {{ entry.title }}</h3>
              {% for entry in craft.entries.section('yourAdventures').descendantOf( entry.id).find() %}
  
              ...
  
              {% endfor %}
          </div>
      </div>
  </div>
  
  {% endif %}
  
  ```
  
  **Tags:** entries, children
  
  > **Comments:**
  > **username_1**: Not sure I understand your question, but you probably just need to change your `{% if %}{% endif %}` to [`{% for %}{% endfor %}`](http://twig.sensiolabs.org/doc/2.x/tags/for.html)?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-02-07. Score: 1 | Accepted answer
  
  Found a solution, I needed: `{% if entry.hasDescendants() %}`
  
  ```
  {% if entry.hasDescendants() %}
  
      <div class="section bg-pattern">
          <div class="inner">
              <div class="col-24 gutter-bottom--half ">
                  <h3>Available {{ entry.title }}</h3>
  
                  {% for entry in craft.entries.section('yourAdventures').descendantOf( entry.id).find() %}
  
                      ...
  
                  {% endfor %}
              </div>
          </div>
      </div>
  
  {% endif %}
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2017-02-04. Score: 6
  
  If I figured out correctly what you want to do - this should do the trick:
  
  ```
  {% if entry.children | length  %}
  
      <div class="section bg-pattern">
          <div class="inner">
               <div class="col-24 gutter-bottom--half">
  
                  <h3>Available {{ entry.title }}</h3>
  
                  {% for child in entry.children %}
                      <p>{{ child.title }}</p>
                  {% endfor %}
  
              </div>
          </div>
      </div>
  
  {% endif %}
  
  ```
  
  [`entry.children`](https://craftcms.com/docs/templating/entrymodel#children) is an alias for [`entry.getDescendants(1)`](https://craftcms.com/docs/templating/entrymodel#getDescendants) which returns [`ElementCriteriaModel`](https://craftcms.com/docs/templating/elementcriteriamodel)
  
  ---
  
  > **Comments:**
  > **username_0**: Thanks for the reply. This is returning the child of the top level entry when in fact I need the second level down. I'll update my question with my entry structure as I see I've not been very clear.  
  
  ---
  
  