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

Embeds and exp:channel:entries problems

Development and Programming

jwindhorst's avatar
jwindhorst
99 posts
14 years ago
jwindhorst's avatar jwindhorst

I can’t get my embedded channel entries tag to work. I’m using Taxonomy and pages. Here is my code:

{embed="structure/header"}


    {embed="content/callout" page_id="{segment_1}"}

    {exp:channel:entries channel={segment_1}}

        {if count==1}
            {exp:taxonomy:breadcrumbs tree_id="2" entry_id="{entry_id}" display_root="yes"}
            <div class="clear"></div>
        {/if}

        <div id="primary-content">
            <h1>{title}</h1>
            

            {body}
        </div>

    {/exp:channel:entries}


{embed="structure/footer"}

And the content/callout template is:

CALLOUTS TEMPLATE
    

    {segment_1}
    <div id="callouts-wrapper">
    {exp:channel:entries channel="callouts"}
            <div id='callout'>
                <h2>{callout_title}</h2>
                {callout_body}
            </div>

    {/exp:channel:entries}
    </div>

I see the “CALLOUTS TEMPLATE” message and the {segment_1} tag, but I don’t get any of my callout entries. Is this a limitation of the pages taxonomy duo, or am I missing some error in my code?

Any help would be appreciated.

       
Greg Aker's avatar
Greg Aker
6,022 posts
14 years ago
Greg Aker's avatar Greg Aker

Hi jwindhorst,

Looks like you’re missing the quotes here around the channel parameter:

{exp:channel:entries channel="{segment_1}"}
       
jwindhorst's avatar
jwindhorst
99 posts
14 years ago
jwindhorst's avatar jwindhorst

Thanks Greg, you are correct, unfortunately even after adding the quotes I’m having the same problem. I was able to create a workaround using the query tag, but it’s far from elegant and I feel like the approach I posted here is a more EE way of dealing with it.

       
iain's avatar
iain
317 posts
14 years ago
iain's avatar iain

When you visit a ‘page’ which is a pages module uri, you’ll need to set the dynamic=”no” parameter on your other channel_entries tags.

At the moment you’re callout template is trying to render the entry with the current pages uri, which of course doesn’t exist and returns nothing.

       
jwindhorst's avatar
jwindhorst
99 posts
14 years ago
jwindhorst's avatar jwindhorst

Thanks guys I’ve gotten working after a bit of restructuring. BTW Iain, in reference to an earlier convo we had, the selectatron rules!

       

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.