Answers.Body: <p>If you are trying to get the top most parent entry of a child entry in a structure, you can use <a href="https://buildwithcraft.com/docs/templating/craft.entries#ancestorOf" rel="noreferrer"><code>ancestorOf</code></a>.</p>
  
  <pre><code>{% set parent = craft.entries.ancestorOf(entry).level(1).first() %}
  &lt;h1&gt;{{parent.title}}&lt;/h1
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-09-24T13:09:36.410Z
Answers.LastActivityDate: 2015-09-24T13:09:36.410Z
Answers.UserDisplayName: Aaron Berkowitz
Body: <p>I want to display the current title of the parent structure inside the child template.</p>
  
  <p>How would I do that?</p>
  
  <ul>
  <li>Parent (Title: Bla)</li>
  <li><ul>
  <li>Child (Here I want to display <code>Bla</code>)</li>
  </ul></li>
  <li><p>Parent (Title: Blablu)</p></li>
  <li><ul>
  <li>Child (Here I want to display <code>Blablu</code>)</li>
  </ul></li>
  </ul>
  
  <p>I tried something like (in the child template):</p>
  
  <pre><code>{% set parentTitle = craft.entries.section('structure').level(1).title %}
  &lt;h1&gt;{{ parentTitle }}&lt;/h1&gt;
  </code></pre>
  
  <p>But that doesn't even result in an error</p>
  
Tags: <structure>
Title: Title of the current parent structure
ThreadText: # Title of the current parent structure
  
  (Asked by: username_0 on 2015-09-24)
  
  I want to display the current title of the parent structure inside the child template.
  
  How would I do that?
  
  * Parent (Title: Bla)
  * + Child (Here I want to display `Bla`)
  * Parent (Title: Blablu)
  * + Child (Here I want to display `Blablu`)
  
  I tried something like (in the child template):
  
  ```
  {% set parentTitle = craft.entries.section('structure').level(1).title %}
  <h1>{{ parentTitle }}</h1>
  
  ```
  
  But that doesn't even result in an error
  
  **Tags:** structure
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-09-24. Score: 7 | Accepted answer
  
  If you are trying to get the top most parent entry of a child entry in a structure, you can use [`ancestorOf`](https://buildwithcraft.com/docs/templating/craft.entries#ancestorOf).
  
  ```
  {% set parent = craft.entries.ancestorOf(entry).level(1).first() %}
  <h1>{{parent.title}}</h1
  
  ```
  
  
  ---
  
  