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?

2 Answers 2


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


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

  • The error is Calling unknown method: craft\elements\Entry::bannerLabel() Commented May 29, 2019 at 20:06
  • 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 :) Commented May 30, 2019 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.