Answers.Body: <p>I'd simplify the entry like so</p>
  
  <pre><code>   {% set entry = craft.entries.id(5) %}
     {{ entry.title }}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-20T15:57:36.433Z
Answers.Text: This made me realize I had the for loop outside of the block. As soon as I moved the loop inside the block it worked. I'm such a noob
Answers.UserDisplayName: CreateSean
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-07-20T15:55:35.107Z
Answers.LastActivityDate: 2016-07-20T15:55:35.107Z
Answers.UserDisplayName: Steven Grant
Body: <p>Working on my first craft site and I'm setting up a thankyou template for after a form submission, but am getting an error when calling the contact entry (it's a single).</p>
  
  <p>I've tried several code variations with no luck. This is my current template</p>
  
  <pre><code>{#
   # Contact Thank You template
   # ---------------
   #}
  
  {% extends "_layout" %}
  
  {# pass body id to layout template #}
  {% set bodyId = 'contact' %}
  
      {% set entries = craft.entries.section('contact').id(5).find() %}
      {% for entry in entries %}
  
          {# Top Images/Slider Content Here #}
          {% block headImage %}
          {{ entry.title }}
  
          {% endblock %}
  
      {% endfor %}{# end contact entry for loop #}
  </code></pre>
  
  <p>Please advise.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-20T15:54:59.763Z
Comments.Text: What's the `block headImage` doing?
Comments.UserDisplayName: Steven Grant
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-07-20T15:56:25.543Z
Comments.Text: That block is in the layout template and is usually replaced with an image from the entry. I've just removed the image for testing purposes and am tryiing to pull in the title
Comments.UserDisplayName: CreateSean
Tags: <templating><error>
Title: Variable "entry" does not exist
ThreadText: # Variable "entry" does not exist
  
  (Asked by: username_0 on 2016-07-20)
  
  Working on my first craft site and I'm setting up a thankyou template for after a form submission, but am getting an error when calling the contact entry (it's a single).
  
  I've tried several code variations with no luck. This is my current template
  
  ```
  {#
   # Contact Thank You template
   # ---------------
   #}
  
  {% extends "_layout" %}
  
  {# pass body id to layout template #}
  {% set bodyId = 'contact' %}
  
      {% set entries = craft.entries.section('contact').id(5).find() %}
      {% for entry in entries %}
  
          {# Top Images/Slider Content Here #}
          {% block headImage %}
          {{ entry.title }}
  
          {% endblock %}
  
      {% endfor %}{# end contact entry for loop #}
  
  ```
  
  Please advise.
  
  **Tags:** templating, error
  
  > **Comments:**
  > **username_1**: What's the `block headImage` doing?  
  > **username_0**: That block is in the layout template and is usually replaced with an image from the entry. I've just removed the image for testing purposes and am tryiing to pull in the title  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-07-20. Score: 3 | Accepted answer
  
  I'd simplify the entry like so
  
  ```
     {% set entry = craft.entries.id(5) %}
     {{ entry.title }}
  
  ```
  
  > **Comments:**
  > **username_0**: This made me realize I had the for loop outside of the block. As soon as I moved the loop inside the block it worked. I'm such a noob  
  
  ---
  
  