<p>Here's your problem... You're redefining <code>entry</code> halfway down the page.</p>

<p>This page clearly uses the section's built-in routing functionality. I can tell because you use <code>entry.body</code> near the top of your page <em>without explicitly declaring the value of <code>entry</code></em>.</p>

<p>However, you later on use <code>{% set entry %}</code> to <strong>reassign</strong> the value of <code>entry</code>. Based on the new value of <code>entry</code>, the <code>entry.footer</code> property no longer exists or is empty.</p>

<p><strong>How to fix it...</strong></p>

<p>Instead of <code>{% set entry %}</code>, use a <em>different</em> variable name:</p>

<pre><code>{% set getQuoteEntry = craft.entries.slug('get-a-quote').first %}
&lt;a href="{{ getQuoteEntry.url }}" class="btn-quote"&gt;request a quote&lt;/a&gt;
</code></pre>

<p>This will leave the original value of <code>entry</code> untouched, and you'll still have access to <code>entry.footer</code> at the bottom of the page.</p>

CC BY-SA 3.0
2014-09-23T21:00:14.153Z
Where do I declare the value of {{ getQuoteEntry.url }}. Would that be done as a global variable?
frshjb373
CC BY-SA 3.0
2014-09-23T21:05:59.600Z
Just updated my answer to clarify... `entry` is an Entry, created automatically for you by Craft's magical routing system. `getQuoteEntry` is **also** an Entry, but you'll need to set it manually.
Lindsey D
CC BY-SA 3.0
2014-09-23T21:07:24.017Z
`entry` is **this** entry. `getQuoteEntry` is **a separate** entry.
Lindsey D
CC BY-SA 3.0
2014-09-23T20:42:21.977Z
2014-09-23T21:03:29.053Z
2014-09-23T21:03:29.053Z
Lindsey D
<p>The <a href="http://twig.sensiolabs.org/doc/tags/set.html" rel="nofollow">twig set tag</a> has two syntaxes. You can use it like this:</p>

<pre><code>{% set foo = 'bar' %}
</code></pre>

<p>or like this:</p>

<pre><code>{% set foo %}bar{% endset %}
</code></pre>

<p>They are both useful in different ways.</p>

<p>The error you were getting was about mixing them.</p>

CC BY-SA 3.0
2014-09-23T20:12:51.470Z
still doesn't solve issue however, as nothing in the `{{ entry.footer }}` field will output when added below that `{% set... %}` code.  Neither of the syntaxes are working for me, unless I'm still missing something.
frshjb373
CC BY-SA 3.0
2014-09-23T18:20:42.100Z
2014-09-23T18:20:42.100Z
Marion Newlevant
<p>I have an <code>{entry.footer}</code> field outputting just fine everywhere before <code>{% set entry... %}</code>
Added <code>{% endset %}</code> tags after closing anchor tag and caused an error. Any idea what the issue is?</p>

<pre><code>{% extends "_layout" %}

{% block home_slider %}
{% include 'global/home-slider.html' %}
{% endblock %}

{% block content %}
            &lt;main id="main" role="main"&gt;
                &lt;div id="content"&gt;
                    &lt;div class="holder-top"&gt;
                        &lt;div class="holder"&gt;
                            &lt;div class="text-wrap"&gt;
                                &lt;div class="wrap"&gt;
                                     {{ entry.body }}
                                &lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="three-columns"&gt;
                                &lt;div class="wrap"&gt;
                                    {% for block in entry.threeHomepageImages.type('images') %}
                                        &lt;div class="col"&gt;
                                            &lt;div class="image-block"&gt;
                                                &lt;div class="image"&gt;
                                                    {% if block.image|length %}
                                                        &lt;a href="{{ block.pageLink.first().getUrl() }}"&gt;&lt;img src="images/{{ block.image.first }}.jpg" alt="{{ block.alt }}"&gt;&lt;/a&gt;
                                                    {% endif %}
                                                &lt;/div&gt;
                                            &lt;/div&gt;
                                            &lt;h1&gt;&lt;a href="{{ block.pageLink.first().getUrl() }}"&gt;{{ block.imageTitle }}&lt;/a&gt;&lt;/h1&gt;
                                        &lt;/div&gt;
                                    {% endfor %}
                                &lt;/div&gt;
                            &lt;/div&gt;
                            &lt;div class="btn-holder"&gt;
                                &lt;div class="btn-wrap"&gt;
                                    {% set entry = craft.entries.slug('get-a-quote').first %}
                                    &lt;a href="{{ entry.url }}" class="btn-quote"&gt;request a quote&lt;/a&gt;
                                    {% endset %}
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="holder-bottom"&gt;
                        &lt;div class="quote"&gt;
                            {{ entry.footer }}
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/main&gt;

{% endblock %}
</code></pre>

CC BY-SA 3.0
2014-09-23T16:48:18.843Z
Not seeing the `{% endset %}`. What error are you getting where?
Marion Newlevant
CC BY-SA 3.0
2014-09-23T17:40:06.583Z
when I include `{% endset %}` I get the following error: 
**Internal Server Error

Unexpected tag name "endset" (expecting closing tag for the "block" tag defined near line 8)** I added entire template code to original post.
frshjb373
CC BY-SA 3.0
2014-09-23T20:35:08.810Z
Definitely ditch the `{% endset %}`, per [Marion's suggestion below](http://craftcms.stackexchange.com/a/2689/45). Do you have [Dev Mode](http://buildwithcraft.com/help/dev-mode) enabled on your local site? What happens when you put `{{ dump(entry) }}` after your `{% set entry %}` tag?
Lindsey D
CC BY-SA 3.0
2014-09-23T20:48:09.027Z
It outputs a ton of code...same either way.
frshjb373
<templating><field><entry><set>
Entry field not outputting after {% set... %} code in template
# Entry field not outputting after {% set... %} code in template

(Asked by: username_0 on 2014-09-23)

I have an {entry.footer} field outputting just fine everywhere before {% set entry... %}
Added {% endset %} tags after closing anchor tag and caused an error. Any idea what the issue is?
{% extends "_layout" %}

{% block home_slider %}
{% include 'global/home-slider.html' %}
{% endblock %}

{% block content %}
            
                
                    
                        
                            
                                
                                     {{ entry.body }}
                                
                            
                            
                                
                                    {% for block in entry.threeHomepageImages.type('images') %}
                                        
                                            
                                                
                                                    {% if block.image|length %}
                                                        
                                                    {% endif %}
                                                
                                            
                                            {{ block.imageTitle }}
                                        
                                    {% endfor %}
                                
                            
                            
                                
                                    {% set entry = craft.entries.slug('get-a-quote').first %}
                                    request a quote
                                    {% endset %}
                                
                            
                        
                    
                    
                        
                            {{ entry.footer }}
                        
                    
                
            

{% endblock %}

**Tags:** templating, field, entry, set

> **Comments:**
> **username_1**: Not seeing the `{% endset %}`. What error are you getting where?  
> **username_0**: when I include `{% endset %}` I get the following error:  **Internal Server Error  Unexpected tag name "endset" (expecting closing tag for the "block" tag defined near line 8)** I added entire template code to original post.  
> **username_2**: Definitely ditch the `{% endset %}`, per [Marion's suggestion below](http://craftcms.stackexchange.com/a/2689/45). Do you have [Dev Mode](http://buildwithcraft.com/help/dev-mode) enabled on your local site? What happens when you put `{{ dump(entry) }}` after your `{% set entry %}` tag?  
> **username_0**: It outputs a ton of code...same either way.  

---

## 2 answers

### Answer by username_2 on 2014-09-23. Score: 5

Here's your problem... You're redefining entry halfway down the page.
This page clearly uses the section's built-in routing functionality. I can tell because you use entry.body near the top of your page without explicitly declaring the value of entry.
However, you later on use {% set entry %} to reassign the value of entry. Based on the new value of entry, the entry.footer property no longer exists or is empty.
How to fix it...
Instead of {% set entry %}, use a different variable name:
{% set getQuoteEntry = craft.entries.slug('get-a-quote').first %}
request a quote

This will leave the original value of entry untouched, and you'll still have access to entry.footer at the bottom of the page.

> **Comments:**
> **username_0**: Where do I declare the value of {{ getQuoteEntry.url }}. Would that be done as a global variable?  
> **username_2**: Just updated my answer to clarify... `entry` is an Entry, created automatically for you by Craft's magical routing system. `getQuoteEntry` is **also** an Entry, but you'll need to set it manually.  
> **username_2**: `entry` is **this** entry. `getQuoteEntry` is **a separate** entry.  

---

### Answer by username_1 on 2014-09-23. Score: 3

The twig set tag has two syntaxes. You can use it like this:
{% set foo = 'bar' %}

or like this:
{% set foo %}bar{% endset %}

They are both useful in different ways.
The error you were getting was about mixing them.

> **Comments:**
> **username_0**: still doesn't solve issue however, as nothing in the `{{ entry.footer }}` field will output when added below that `{% set... %}` code.  Neither of the syntaxes are working for me, unless I'm still missing something.  

---

