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.

using the entry_id="" tag

August 11, 2010 1:24pm

Subscribe [3]
  • #1 / Aug 11, 2010 1:24pm

    Andy Williamson

    16 posts

    Hi,

    I’m having some problems with the entry_id tag. I want two specific entries to appear on a page. To test I’ve created a channel with 2 entries, however I can only display the first one.

    The code is basically like this

    {exp:channel:entries  channel="news" entry_id="1"}
    {title}
    {body}
    (page_url}
    {/exp:channel:entries}

     

    and then later in the page

    {exp:channel:entries  channel="news" entry_id="2"}
    {title}
    {body}
    (page_url}
    {/exp:channel:entries}

    for some reason I can only get the first entry to show up, also if I change both to say ID 1 both display, but when I change both to 2 neither display.

    I thought maybe I’m using the wrong ID, I’m getting the ID number from the edit channel entries page # first left column. Is there another ID? or is there another reason why I can only display the first entry?

    thanks

  • #2 / Aug 11, 2010 1:26pm

    Green Egg Media

    111 posts

    Looks like you need to set the dynamic=“off” parameter to display multiple entries on a single page.

    Lance
    Green Egg Media

  • #3 / Aug 11, 2010 1:27pm

    Green Egg Media

    111 posts

    Just to clarify, if would look something like this:

    {exp:channel:entries  channel="news" entry_id="2" dynamic="off"}
    {title}
    {body}
    (page_url}
    {/exp:channel:entries}

    Rinse & repeat as necessary.

  • #4 / Aug 11, 2010 1:34pm

    Andy Williamson

    16 posts

    Thank you I’ll try that right now

  • #5 / Aug 11, 2010 3:17pm

    Ingmar

    29245 posts

    Very good. Let us know how you progress.

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

ExpressionEngine News!

#eecms, #events, #releases