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.

Entry won't display correctly

March 03, 2011 9:43pm

Subscribe [4]
  • #1 / Mar 03, 2011 9:43pm

    Jeri Letman

    23 posts

    I’ve got a weird situation.

    I’m trying to view a registration and

    {exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared" entry_id="{entry_id}"}

    doesn’t display the entry. However, this does.

    <pre><code>{exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared" entry_id="{entry_id}}</code></pre>

    As soon as I have the closing ” around entry_id, the values won’t output on the page correctly.

    Any suggestions?

    Thanks.

  • #2 / Mar 03, 2011 10:09pm

    Mark Bowen

    12637 posts

    Hiya,

    What exactly is {entry_id}? I’m guessing it’s a Global Variable or something like that?

    What is stored in it? Also if you just place that {entry_id} variable in the template outside the weblog entries tag then what does it spit out?

    Best wishes,

    Mark

  • #3 / Mar 03, 2011 11:36pm

    Jeri Letman

    23 posts

    {entry_id} is the ID number of the entry. In this case, the last part of the url.  i

    ex. http://www.domain.com/home.php/accounts/registrations_view/59584

    If I place {entry_id} on the page by itself it outputs 59584

  • #4 / Mar 04, 2011 6:46am

    Mark Bowen

    12637 posts

    I’m not too sure how you’re getting {entry_id} to spit out the entry_id on a page if you haven’t got it placed inside any tags or anything as that variable only works inside of a weblog tag.

    Do you definitely have that {entry_id} variable in a template without it being inside any other tags? If so then I wouldn’t expect anything to show up unless as mentioned above you have a global variable set somewhere in your system.

    If you check the source code of the page where you are getting 59584 output to the page then is there anything surrounding that number such as any html tags?

    Best wishes,

    Mark

  • #5 / Mar 04, 2011 2:49pm

    Sue Crocker

    26054 posts

    Jeri - since you already have the entry_id in segment_3, what happens if you don’t specify that, or use entry_id = “{segment_3” ?

  • #6 / Mar 04, 2011 5:12pm

    Jeri Letman

    23 posts

    @Mark

    {entry_id} was inside the tag when it displayed. Viewing the source, there was no HTML code around it.

    @SUE

    I wanted to view entry 59563. The following work.

    {exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared" entry_id='{segment_3}'}
    
    {exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared"}
    
    {exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared" entry_id='59563'}
    
    {exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared" entry_id="{entry_id}}</code></pre>
    
    This one didn't output anything.
    
    <pre><code>{exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared" entry_id="{entry_id}"}

    The code that displays the record is an embedded file, called _licensee_registration_view

    The page template is

    {v2_html_head}
    <title></title>
    {v2_stylesheets}
    {v2_js}
    {v2_swf}
    {v2_ie7}
    </head>
    <body>
    <div class="container_12">
    <div id="content">
    <div class="grid_12">
      {embed="includes/_v2_header_licensee"}
    </div>
    <div class="grid_12">
       {if logged_in AND group_id == "7"}
        {embed="includes/_licensee_registration_view"}
      {/if}
      {if logged_out}
         {embed="includes/_licensee_not_logged_in"}
      {/if}
    </div>
     {embed="includes/_v2_come_see_us"}
    </div>{!-- Ends Content Container --}
    </div>{!-- Ends Container 12 --}
    {clear}
    {embed="includes/_v2_footer"}
    
    </div>
    {v2_upgrade}
    </body>
    </html>

    Thanks.

  • #7 / Mar 04, 2011 5:21pm

    Mark Bowen

    12637 posts

    Have you tried what Sue mentioned above?

    I’m still very confused as to how {entry_id} is doing anything being placed within the weblog parameter like that as it doesn’t go there at all.

    Do you perhaps have a weblog entries tag nested inside another one or something similar?

    Best wishes,

    Mark

  • #8 / Mar 04, 2011 5:46pm

    Jeri Letman

    23 posts

    Hi Mark,

    Sue’s examples worked.

    {exp:weblog:entries weblog="orders" status="open|Completed|Pre-Registered|Registered - Payment Cleared" entry_id="{entry_id}"}

    Maybe the reason it didn’t work is that {entry_id} doesn’t belong there, and when I left off the closing “, it made it work in the standard way?

    I looked back at other SAEFs I have, and in those I used {segment_3}.

    Jer

  • #9 / Mar 04, 2011 5:49pm

    Mark Bowen

    12637 posts

    Hi Jeri,

    Glad that it’s working. Yep may have been that leaving off the quote mark made the tag completely ignore that part of it thus forcing it to use the URL information. As mentioned before placing {entry_id} in there would never do anything unless that was setup as a global variable or something like that which really wouldn’t be a good thing to do as that is a standard weblog variable.

    Anyway good to see it’s working now.

    Best wishes,

    Mark

  • #10 / Mar 05, 2011 4:35pm

    Greg Salt

    3988 posts

    Hi Jeri,

    Glad that Sue was able to help you get this sorted out. I’ll close this thread now but please open a related thread if you continue to have problems with this issue.

    Cheers

    Greg

    @Mark, thanks for helping out.

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

ExpressionEngine News!

#eecms, #events, #releases