Answers.Body: <p>There are many ways to paginate:</p>
  
  <h1>To show next / prev links</h1>
  
  <p>#1
  <a href="https://craftcms.com/docs/templating/entrymodel#getPrevSibling" rel="nofollow noreferrer">getPrevSibling</a> <a href="https://craftcms.com/docs/templating/entrymodel#getNextSibling" rel="nofollow noreferrer">getNextSibling</a></p>
  
  <pre><code>{% if entry.getPrevSibling %}
      &lt;a href="{{entry.getPrevSibling.url}}"&gt;{{entry.getPrevSibling.title}}&lt;/a&gt;
  {% endif %}
  
  {% if entry.getNextSibling %}
      &lt;a href="{{entry.getNextSibling.url}}"&gt;{{entry.getNextSibling.title}}&lt;/a&gt;
  {% endif %}
  </code></pre>
  
  <p>#2 <a href="https://craftcms.com/docs/templating/entrymodel#getPrev" rel="nofollow noreferrer">getPrev</a> <a href="https://craftcms.com/docs/templating/entrymodel#getNext" rel="nofollow noreferrer">getNext</a></p>
  
  <pre><code>{% set params = {section: entry.section.handle} %}
  {% set prev = entry.getPrev(params) %}
  {% set next = entry.getNext(params) %}
  
  {% if prev %}
      &lt;a href="{{prev.url}}"&gt;{{prev.title}}&lt;/a&gt;
  {% endif %}
  
  {% if next %}
      &lt;a href="{{next.url}}"&gt;{{next.title}}&lt;/a&gt;
  {% endif %}
  </code></pre>
  
  <h1>To show list of children (single type page)</h1>
  
  <p><a href="https://craftcms.com/docs/templating/paginate" rel="nofollow noreferrer">{% paginate %}</a></p>
  
  <pre><code>{% paginate craft.entries.section('sectionHandle').limit(10) as pageEntries %}
  
  {% for entry in pageEntries %}
      &lt;article&gt;
          &lt;h1&gt;{{ entry.title }}&lt;/h1&gt;
          {{ entry.body }}
      &lt;/article&gt;
  {% endfor %}
  
  {% if pageInfo.prevUrl %}&lt;a href="{{ pageInfo.prevUrl }}"&gt;Previous Page&lt;/a&gt;{% endif %}
  {% if pageInfo.nextUrl %}&lt;a href="{{ pageInfo.nextUrl }}"&gt;Next Page&lt;/a&gt;{% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-28T11:57:43.387Z
Answers.LastActivityDate: 2016-11-28T11:57:43.387Z
Answers.UserDisplayName: Krzysztof Boduch
Body: <p>Or to say it in a different way, paginate siblings.</p>
  
  <p>I found this question on stack: <a href="https://craftcms.stackexchange.com/questions/1203/how-do-you-page-through-child-entries-in-a-structure">How do you page through child entries in a structure?</a> which seems to have a working answer. However trying this myself I get no results.</p>
  
  <p>To be clear, I have a two level structure.</p>
  
  <pre><code>Level 1 (parent)
   - Level 2 (child)
   - Level 2 (child)
   - and so on..
  </code></pre>
  
  <p>How can I paginate the children?</p>
  
  <p>Thank you for any input!</p>
  
Tags: <pagination>
Title: Paginate children in a structure
ThreadText: # Paginate children in a structure
  
  (Asked by: username_0 on 2016-11-27)
  
  Or to say it in a different way, paginate siblings.
  
  I found this question on stack: [How do you page through child entries in a structure?](https://craftcms.stackexchange.com/questions/1203/how-do-you-page-through-child-entries-in-a-structure) which seems to have a working answer. However trying this myself I get no results.
  
  To be clear, I have a two level structure.
  
  ```
  Level 1 (parent)
   - Level 2 (child)
   - Level 2 (child)
   - and so on..
  
  ```
  
  How can I paginate the children?
  
  Thank you for any input!
  
  **Tags:** pagination
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-11-28. Score: 2 | Accepted answer
  
  There are many ways to paginate:
  
  # To show next / prev links
  
  #1
  [getPrevSibling](https://craftcms.com/docs/templating/entrymodel#getPrevSibling) [getNextSibling](https://craftcms.com/docs/templating/entrymodel#getNextSibling)
  
  ```
  {% if entry.getPrevSibling %}
      <a href="{{entry.getPrevSibling.url}}">{{entry.getPrevSibling.title}}</a>
  {% endif %}
  
  {% if entry.getNextSibling %}
      <a href="{{entry.getNextSibling.url}}">{{entry.getNextSibling.title}}</a>
  {% endif %}
  
  ```
  
  #2 [getPrev](https://craftcms.com/docs/templating/entrymodel#getPrev) [getNext](https://craftcms.com/docs/templating/entrymodel#getNext)
  
  ```
  {% set params = {section: entry.section.handle} %}
  {% set prev = entry.getPrev(params) %}
  {% set next = entry.getNext(params) %}
  
  {% if prev %}
      <a href="{{prev.url}}">{{prev.title}}</a>
  {% endif %}
  
  {% if next %}
      <a href="{{next.url}}">{{next.title}}</a>
  {% endif %}
  
  ```
  
  # To show list of children (single type page)
  
  [{% paginate %}](https://craftcms.com/docs/templating/paginate)
  
  ```
  {% paginate craft.entries.section('sectionHandle').limit(10) as pageEntries %}
  
  {% for entry in pageEntries %}
      <article>
          <h1>{{ entry.title }}</h1>
          {{ entry.body }}
      </article>
  {% endfor %}
  
  {% if pageInfo.prevUrl %}<a href="{{ pageInfo.prevUrl }}">Previous Page</a>{% endif %}
  {% if pageInfo.nextUrl %}<a href="{{ pageInfo.nextUrl }}">Next Page</a>{% endif %}
  
  ```
  
  
  ---
  
  