Answers.Body: <p>If you're getting all the descendants in the for loop, you can use <code>loop</code> to get the index of the current iteration:</p>
  
  <pre><code>{% for chapter in entry.descendants %}
      &lt;div class="part"&gt;&lt;span&gt;Part {{ loop.index | numbersToWords }}&lt;/span&gt;&lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>See the <a href="http://twig.sensiolabs.org/doc/tags/for.html#the-loop-variable" rel="nofollow noreferrer">documentation for loop in the Twig docs</a> for more details.</p>
  
  <p>This gives you the index of the current iteration in the for loop though, not the actual position of the child in the structure. So if you query only a subset of the descendants, or reorder and manipulate the descendants, this won't work.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-14T21:38:02.647Z
Answers.Text: Thanks André, that works nicely as each chapter has a subtitle and the part order number matches the Structure and the custom editor's (drag & drop) arrangement.
Answers.UserDisplayName: Nutmeg
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-14T09:20:09.027Z
Answers.LastActivityDate: 2016-11-14T09:27:19.537Z
Answers.LastEditDate: 2016-11-14T09:27:19.537Z
Answers.UserDisplayName: André Elvan
Body: <p>I thought this was going to be easy; showing the order number of children against their parent, but the only answer I can find is in this <a href="https://craftcms.stackexchange.com/questions/13214/how-to-get-the-order-number-of-the-current-entry-in-a-structure">thread</a> </p>
  
  <p>and I'm unsure how to implement this into my code.</p>
  
  <pre><code>{% for chapter in entry.descendants %}
  &lt;div class="part"&gt;&lt;span&gt;Part {{ chapter.orderNumber | numbersToWords }}&lt;/span&gt;&lt;/div&gt;
  &lt;/div&gt;                      
  {% endfor %}
  </code></pre>
  
  <p>Resulting in: <strong>Part One</strong></p>
  
  <p>Note: <code>numbersToWords</code> is the Helpers Plugin by <a href="https://github.com/carlcs/craft-helpers" rel="nofollow noreferrer">carlcs</a> </p>
  
Tags: <entries><order><children><number>
Title: Display children's order numbers
ThreadText: # Display children's order numbers
  
  (Asked by: username_0 on 2016-11-14)
  
  I thought this was going to be easy; showing the order number of children against their parent, but the only answer I can find is in this [thread](https://craftcms.stackexchange.com/questions/13214/how-to-get-the-order-number-of-the-current-entry-in-a-structure)
  
  and I'm unsure how to implement this into my code.
  
  ```
  {% for chapter in entry.descendants %}
  <div class="part"><span>Part {{ chapter.orderNumber | numbersToWords }}</span></div>
  </div>                      
  {% endfor %}
  
  ```
  
  Resulting in: **Part One**
  
  Note: `numbersToWords` is the Helpers Plugin by [carlcs](https://github.com/carlcs/craft-helpers)
  
  **Tags:** entries, order, children, number
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-11-14. Score: 1 | Accepted answer
  
  If you're getting all the descendants in the for loop, you can use `loop` to get the index of the current iteration:
  
  ```
  {% for chapter in entry.descendants %}
      <div class="part"><span>Part {{ loop.index | numbersToWords }}</span></div>
  {% endfor %}
  
  ```
  
  See the [documentation for loop in the Twig docs](http://twig.sensiolabs.org/doc/tags/for.html#the-loop-variable) for more details.
  
  This gives you the index of the current iteration in the for loop though, not the actual position of the child in the structure. So if you query only a subset of the descendants, or reorder and manipulate the descendants, this won't work.
  
  > **Comments:**
  > **username_0**: Thanks username_1, that works nicely as each chapter has a subtitle and the part order number matches the Structure and the custom editor's (drag & drop) arrangement.  
  
  ---
  
  