<p>My bad. Total n00b error. Made the content a global so it can exist outside of specific template and solved it</p>

CC BY-SA 4.0
2019-05-29T20:36:25.323Z
2019-05-29T20:36:25.323Z
alex morris
<p>There might not be an entry associated with the current URL, what is the exact twig runtime error?</p>

CC BY-SA 4.0
2019-05-29T20:06:48.093Z
The error is `Calling unknown method: craft\elements\Entry::bannerLabel()`
alex morris
CC BY-SA 4.0
2019-05-30T16:49:30.270Z
This means that there is no "bannerLabel" field on the entry object, but the entry object does exist. If the entry did not exist, it would say that :)
Clark Nelson
CC BY-SA 4.0
2019-05-29T15:33:04.257Z
2019-05-29T15:33:04.257Z
Clark Nelson
<p>I have some content I wish to output in the main parent _layout.html template. Seems like something simple to achieve but can't seem to figure it out. If I call {{ entry.bannerLabel }} etc it throws twig runtime errors. </p>

<p>I'm wondering if it's because it's outside of the {% block content %} section of the template?</p>

<templating><entries>
Access entry content in _layout.html
# Access entry content in _layout.html

(Asked by: username_0 on 2019-05-29)

I have some content I wish to output in the main parent \_layout.html template. Seems like something simple to achieve but can't seem to figure it out. If I call {{ entry.bannerLabel }} etc it throws twig runtime errors.

I'm wondering if it's because it's outside of the {% block content %} section of the template?

**Tags:** templating, entries

---

## 2 answers

### Answer by username_0 on 2019-05-29. Score: 2

My bad. Total n00b error. Made the content a global so it can exist outside of specific template and solved it


---

### Answer by username_1 on 2019-05-29. Score: 1

There might not be an entry associated with the current URL, what is the exact twig runtime error?

> **Comments:**
> **username_0**: The error is `Calling unknown method: craft\elements\Entry::bannerLabel()`  
> **username_1**: This means that there is no "bannerLabel" field on the entry object, but the entry object does exist. If the entry did not exist, it would say that :)  

---

