ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Embed not rendering channel:entries pair

February 01, 2011 7:24am

Subscribe [5]
  • #1 / Feb 01, 2011 7:24am

    Andy Harris

    958 posts

    Hi - this is a strange one. I have a page that looks like this:

    {exp:channel:entries disable="categories|category_fields|member_data|pagination|trackbacks"}
    {html_header}
    <body class="team">
    {page_header}
    <div class="wrap">
        {embed="content/list_team"}
        {page_body}
        {footer}
    </div>
    {html_footer}
    {/exp:channel:entries}

    This is all kosher. On line 6 is an embed to my team list, which looks like this:

    {exp:channel:entries channel="team" disable="categories|category_fields|member_data|pagination|trackbacks" dynamic="off"}
    {if count == "1"}<ul class="list list_panel list_team">{/if}
    <li>
        <h2>{title}</h2>
    <p></li><br />
    {if count == total_results}</ul>{/if}<br />
    {/exp:channel:entries}

    It renders nothing on screen, but if I add something before the entries pair it works OK. So this will work:

    x
    {exp:channel:entries channel="team" disable="categories|category_fields|member_data|pagination|trackbacks" dynamic="off"}
    {if count == "1"}<ul class="list list_panel list_team">{/if}
    <li>
        <h2>{title}</h2>
    <p></li><br />
    {if count == total_results}</ul>{/if}<br />
    {/exp:channel:entries}

    Any idea what this might be?

  • #2 / Feb 01, 2011 7:32am

    GDmac - expocom

    350 posts

    Have you tested with a {if no_results)...x…{/if}
    edit: and what if you browse to content/list_team directly?

  • #3 / Feb 01, 2011 7:33am

    Andy Harris

    958 posts

    No, but that isn’t the problem - I know the list has content because it appears fine once that x is added. The x isn’t part of the list - it’s outside of it.

  • #4 / Feb 01, 2011 7:39am

    Steven Grant

    894 posts

    channel entries inside a channel entries?

    Would I be right in guessing this is a Structure page?

  • #5 / Feb 01, 2011 7:39am

    Steven Grant

    894 posts

    scratch that - saw Mr Abraham’s reply.

  • #6 / Feb 01, 2011 7:45am

    Andy Harris

    958 posts

    I seem to have gotten this working but I can’t explain how. There was a snippet being called before the embed, and my fiddling with this and resaving (despite changing nothing) has caused it to all work OK.

    How bizarre….thanks for your help guys!

  • #7 / Feb 01, 2011 7:53am

    Steve Abraham

    149 posts

    Don’t you just love these wee glitches? 😉

  • #8 / Feb 01, 2011 5:06pm

    Ingmar

    29245 posts

    Glad to see it’s working now, Andy. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases