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

Nested channel entry tags

Development and Programming

dcplebranch's avatar
dcplebranch
1 posts
11 years ago
dcplebranch's avatar dcplebranch

So I have code something like this

{exp:channel:entries channel="page|news" disable="categories|category_fields|member_data|pagination"}

{!-- do some things here --}

                  {exp:channel:entries channel="mychannel" dynamic="no" limit="1" orderby="random" category="not 90"}
                    This is the title: {title}
                  {/exp:channel:entries}

{/exp:channel:entries}

These are nested channel entry tags, but they are not pulling from the same channel… the inside tag is pulling from “mychannel”. But {title} is returning the outside channel title (the one from “page|news” channels…) If I move the inside channel entries tag outside of the other channel entries tag so that it’s not nested, then everything works as expected…

Is there any way to have it the way I currently have it and still be able to reference the inside tags like {title}? I know I can do it with embeds, but I want to avoid the performance hit… Is there a way to do it without embeds? Thanks!

       
Boyink!'s avatar
Boyink!
5,011 posts
11 years ago
Boyink!'s avatar Boyink!

You’re nesting channel entries tags but worried about the performance hit of using an embed?

       

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.