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.

SOLVED: Can I use channel:entries twice in a template?

July 26, 2011 1:32pm

Subscribe [2]
  • #1 / Jul 26, 2011 1:32pm

    RedLeader

    33 posts

    I’m trying to display an entry from one channel and then multiple entries from a different channel in one template:

    {exp:channel:entries channel="projects" limit="1"}
    ...blah blah blah
    {/exp:channel:entries}
    
    {exp:channel:entries channel="other_stuff"}
    ...blah blah blah
    {/exp:channel:entries}

    The content from “projects” is working but nothing gets displayed for “other_stuff”.  What am I doing wrong?  Why won’t “other_stuff” output in to this template?

    Thanks for helping a newbie!

  • #2 / Jul 26, 2011 2:40pm

    RedLeader

    33 posts

    Ah HA!

    dynamic=“no” worked when I added it to the second channel:entries tag!

    {exp:channel:entries channel="projects" limit="1"}
    ...blah blah blah
    {/exp:channel:entries}
    
    {exp:channel:entries channel="other_stuff" dynamic="no"}
    ...blah blah blah
    {/exp:channel:entries}

    I have no idea why this worked, but I’m off to read the manual and work out why…

  • #3 / Jul 26, 2011 10:49pm

    Sue Crocker

    26054 posts

    Hi, RedLeader.

    EE “sees” what is in the url and makes assumptions, so when you use dynamic=“no”, EE won’t then pay attention to anything in the url. Glad things are working for you again. If anything else comes up, please do let us know in a new thread..

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

ExpressionEngine News!

#eecms, #events, #releases