We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Embedded Template not rendering

How Do I?

tomtom80's avatar
tomtom80
9 posts
2 years ago
tomtom80's avatar tomtom80

Hello helpful EE community, so I am working in EE7. Thanks for any help in advance.

WORKING

On the main template for the homepage (index.html) embedding hidden templates like {embed="website/_top"} works and renders the content just fine. Within the hidden template (_top.html) I can retrieve field contents from a channel like {exp:channel:entries channel="my_channel"} without a problem.

PROBLEM

But when embedding this very same hidden template (_top.html) in ANOTHER template (article.html) – in fact any other template than index.html – processing the {exp:channel:entries} in _top results in no data at all.

(As a side note: The hidden template is definitely being called from (article.html), which I tested with a single line of comment. But apparently the {exp:channel:entries} is not rendered. Also there are no user / access restrictions on neither the channel nor the templates.)

       
Rob Allen's avatar
Rob Allen
3,105 posts
2 years ago
Rob Allen's avatar Rob Allen

In your embed entries tag try adding the parameter dynamic="no"

? 1
       
tomtom80's avatar
tomtom80
9 posts
2 years ago
tomtom80's avatar tomtom80

Thank you, Rob - that worked just fine!

For anyone visiting this thread with the same issue, here’s the documentation for the dynamic parameter.

So in my case I went into the hidden template _top.html and added dynamic="no" to my {exp:channel:entries ...} statement.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.