Body: <p>I'm building a property developers website and it has a carousel at the bottom of the individual property pages, in which I want to show five other related properties from the same group in the structure and not the entry on the current page also.</p>
  
  <p>This is what I have currently in the code:</p>
  
  <pre><code>{% for nextSibling in craft.entries.section('availablehomes').limit('5') %}
  ...content...
  {% endfor %}
  </code></pre>
  
  <p>However, I've tried many different ways suggested, but I can only get it to show the current property in a continuous loop. So need some help please.</p>
  
  <p>I've attached a screen shot of the carousel and the structure below.</p>
  
  <p>So to clarify, when I'm in the page that's in Lockeswood / Plot 1, I'd like to show the other plots that are under it in the structure, and then if that is less than 5, I'd like it to include the next plots from level(2) in the structure to make it 5.</p>
  
  <p>Cheers  </p>
  
  <p><a href="https://i.sstatic.net/inHLo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/inHLo.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.sstatic.net/ZPiMk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ZPiMk.png" alt="enter image description here"></a></p>
  
  <p>Update:</p>
  
  <p>I've now got it to show entries listed after only, but still need it to show the entries within the relevant group in the structure first before showing other groups entries.</p>
  
  <pre><code>{% set var = craft.entries.positionedAfter(entry).level('2') %}
  {% for entry in var.limit('5') %}
  &lt;div class="related-carousel-cell"&gt;
      &lt;div class="property"&gt;
          &lt;a href="{{ entry.url }}"&gt;
              &lt;div class="wrap"&gt;
                  &lt;img src="{{ entry.plotGallery.first().getUrl('relatedArticlesLarge') }}" class="property-image img-responsive" alt="{{ entry.title }}"&gt;
              &lt;/div&gt;
              &lt;div class="text"&gt;
              &lt;h2&gt;{{ entry.parent ? entry.parent.title }} - &lt;span style="white-space: nowrap;"&gt;{{ entry.title }}&lt;/span&gt;&lt;/h2&gt;
              &lt;/div&gt;
          &lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>Which is outputting the following for Lockeswood / Plot 1, however, the Plot 2 page would not include Plot 1 in it's list as it's now only show entries after the current entry and not the whole group.</p>
  
  <p><a href="https://i.sstatic.net/kts3q.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kts3q.png" alt="enter image description here"></a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-12T21:03:47.070Z
Comments.Text: Can you share some of your internal `...content...` code? It might help debug what is happening.
Comments.UserDisplayName: Aaron Berkowitz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-12T21:05:57.697Z
Comments.Text: <div class="related-carousel-cell">
          <div class="property">
              <a href="{{ entry.url }}">
                  <div class="wrap">
                      <img src="{{ entry.plotGallery.first().getUrl('relatedArticlesLarge') }}" class="property-image img-responsive" alt="{{ entry.title }}">
                  </div>
                  <div class="text">
                  <h2>{{ entry.parent ? entry.parent.title }} - <span style="white-space: nowrap;">{{ entry.title }}</span></h2>
                  </div>
              </a>
      </div>
      </div>
Comments.UserDisplayName: mention79
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-12T21:07:08.183Z
Comments.Text: Instead of `entry`, use `nextSibling`. `entry` is the URL you are on, not the entry you are looking to show in your loop.
Comments.UserDisplayName: Aaron Berkowitz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-12T21:13:31.717Z
Comments.Text: That's something that I tried originally unfortunately. But thanks for trying
Comments.UserDisplayName: mention79
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-12T21:18:23.020Z
Comments.Text: I'm having some success with: `{% set var = craft.entries.positionedAfter(entry).level('2') %}{% for entry in var.limit('5') %}
  ` but, it only adds the entries after the current entry. Whereas I need to include the other entries in the structure group first before showing other section in the structure.
Comments.UserDisplayName: mention79
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-12T22:02:59.013Z
Comments.Text: If you can, update your question with all your current code so we can take a closer look.
Comments.UserDisplayName: Aaron Berkowitz
Tags: <structure>
Title: Related entries from level 2 in structure
ThreadText: # Related entries from level 2 in structure
  
  (Asked by: username_0 on 2017-01-12)
  
  I'm building a property developers website and it has a carousel at the bottom of the individual property pages, in which I want to show five other related properties from the same group in the structure and not the entry on the current page also.
  
  This is what I have currently in the code:
  
  ```
  {% for nextSibling in craft.entries.section('availablehomes').limit('5') %}
  ...content...
  {% endfor %}
  
  ```
  
  However, I've tried many different ways suggested, but I can only get it to show the current property in a continuous loop. So need some help please.
  
  I've attached a screen shot of the carousel and the structure below.
  
  So to clarify, when I'm in the page that's in Lockeswood / Plot 1, I'd like to show the other plots that are under it in the structure, and then if that is less than 5, I'd like it to include the next plots from level(2) in the structure to make it 5.
  
  Cheers
  
  [![enter image description here](https://i.sstatic.net/inHLo.png)](https://i.sstatic.net/inHLo.png)
  
  [![enter image description here](https://i.sstatic.net/ZPiMk.png)](https://i.sstatic.net/ZPiMk.png)
  
  Update:
  
  I've now got it to show entries listed after only, but still need it to show the entries within the relevant group in the structure first before showing other groups entries.
  
  ```
  {% set var = craft.entries.positionedAfter(entry).level('2') %}
  {% for entry in var.limit('5') %}
  <div class="related-carousel-cell">
      <div class="property">
          <a href="{{ entry.url }}">
              <div class="wrap">
                  <img src="{{ entry.plotGallery.first().getUrl('relatedArticlesLarge') }}" class="property-image img-responsive" alt="{{ entry.title }}">
              </div>
              <div class="text">
              <h2>{{ entry.parent ? entry.parent.title }} - <span style="white-space: nowrap;">{{ entry.title }}</span></h2>
              </div>
          </a>
      </div>
  </div>
  {% endfor %}
  
  ```
  
  Which is outputting the following for Lockeswood / Plot 1, however, the Plot 2 page would not include Plot 1 in it's list as it's now only show entries after the current entry and not the whole group.
  
  [![enter image description here](https://i.sstatic.net/kts3q.png)](https://i.sstatic.net/kts3q.png)
  
  **Tags:** structure
  
  > **Comments:**
  > **username_1**: Can you share some of your internal `...content...` code? It might help debug what is happening.  
  > **username_0**: <div class="related-carousel-cell">         <div class="property">             <a href="{{ entry.url }}">                 <div class="wrap">                     <img src="{{ entry.plotGallery.first().getUrl('relatedArticlesLarge') }}" class="property-image img-responsive" alt="{{ entry.title }}">                 </div>                 <div class="text">                 <h2>{{ entry.parent ? entry.parent.title }} - <span style="white-space: nowrap;">{{ entry.title }}</span></h2>                 </div>             </a>     </div>     </div>  
  > **username_1**: Instead of `entry`, use `nextSibling`. `entry` is the URL you are on, not the entry you are looking to show in your loop.  
  > **username_0**: That's something that I tried originally unfortunately. But thanks for trying  
  > **username_0**: I'm having some success with: `{% set var = craft.entries.positionedAfter(entry).level('2') %}{% for entry in var.limit('5') %} ` but, it only adds the entries after the current entry. Whereas I need to include the other entries in the structure group first before showing other section in the structure.  
  > **username_1**: If you can, update your question with all your current code so we can take a closer look.  
  
  ---
  
  ## 0 answers
  
  