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.

No results being returned from embedded template

December 07, 2011 1:27pm

Subscribe [3]
  • #1 / Dec 07, 2011 1:27pm

    JCloutier

    10 posts

    Hello, I am having an issue getting an embedded template to return results.

    This is the code that calls the template. I am using the NSM multiple entry selection field to get the field id’s and it correctly returns “10|7|8” which is passed to the embedded template.

    {exp:channel:entries channel="{pre_my_channel}" limit="1" url_title="{segment_3}"}
    
       {embed="includes/.related-entries" channel="products_channel" related_ids="{news_related_products}"}
         
    {/exp:channel:entries}

    This is the embedded template. It works if I use it as a standalone page and correctly pulls the entry titles. However, as soon as I try to use it as an embedded template it returns no results.

    <ul>
      {exp:channel:entries channel="{embed:channel}" entry_id="{embed:related_ids}"}
        <li>{title}</li>
      {/exp:channel:entries}
    </ul>

    According to the debugger I can see no reason that the values are not getting pulled.
    Debugger output:

    Tag: {exp:channel:entries channel="products_channel" entry_id="10|7|8"}
    (0.229684 / 8.25MB)      Closing Tag Found
    (0.229770 / 8.25MB)      Processing Tags
    (0.229832 / 8.25MB)      Module Tag: Channel/entries
    (0.229864 / 8.25MB)      Including Files for Plugins and Modules
    (0.229894 / 8.25MB)      Files for Plugins and Modules All Included
    (0.229921 / 8.25MB)      Beginning Final Tag Data Processing
    (0.229954 / 8.25MB)      Calling Class/Method: Channel/entries
    (0.230208 / 8.25MB)       -> Class Called: Channel
    (0.230336 / 8.26MB)       -> Method Called: entries
    (0.233046 / 8.26MB)      Returning No Results Content

    Any ideas?

  • #2 / Dec 08, 2011 12:33pm

    Kevin Smith

    4784 posts

    Hi JCloutier,

    I suspect the embedded Channel Entries tag just need to know not to display its entries based on anything in the URI, so just add the following to the Channel Entries tag in your embedded template:

    dynamic="no"

    Does that take care of it?

  • #3 / Dec 08, 2011 12:59pm

    JCloutier

    10 posts

    Fixed, thank you very much.

  • #4 / Dec 08, 2011 8:07pm

    Sean C. Smith

    3818 posts

    Hi JCloutier,

    Glad that Kevin was able to help you out. Feel free to post again when you need more help.

    Sean

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

ExpressionEngine News!

#eecms, #events, #releases