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.

Content not matching the URL entry

December 06, 2010 7:57pm

Subscribe [4]
  • #1 / Dec 06, 2010 7:57pm

    NDC

    22 posts

    I’m struggling to figure out why in my news view template the content that’s being pulled is always from the most recent weblog posting.  For example I have two articles on my site with URL’s of http://mysite.com/news/view/article1 and http://mysite.com/news/view/article2

    If I’m viewing article1 it will actually display article2’s content instead of article1’s content.  Below is the view template, I have a sneaking suspicion I’m overlooking something but can’t quite figure it out.

    Thanks,

    Craig

    <div id="main_content" class="container_24">
        
        {exp:weblog:entries weblog="news" dynamic="off" limit="1" disable="trackbacks|comments status="open"}
        <div id="lcol_content" class="grid_12">
            {if release_image == ''}
                {site_url}images/sized/images/uploads/ice_golf-430x490.jpg
            {/if}
            {exp:imgsizer:size image="{release_image}" width="440" alt="News Release" id="story-graphic"} 
            {embed="news/list"}
        </div>
        <div id="rcol_content" class="grid_11">
            <h1>{title}</h1>
            <ul class="release_info">
                <li>{entry_date format="%F %d %Y"}</li>
                <li><strong>By</strong>
                    {if release_author == ''}{author}{/if}
                    {release_author}
                </li>
            </ul>
            {release_body}
        </div>
            {/exp:weblog:entries}
        <div class="clear"></div>
    </div>
  • #2 / Dec 06, 2010 9:12pm

    You’ll probably want to lose that dynamic=“off” is you want your template to response to the url ; )

    Also, check the status of your entries to make sure they’re set to “open.”

  • #3 / Dec 07, 2010 9:21am

    Sue Crocker

    26054 posts

    Thanks for the assist, Dylan.

    Welcome to the ExpressionEngine forums, NDC.

    Since you’re new to the EE forums, have you seen EEWiki:// How to Post a Support Request?

    Does Dylan’s response help?

  • #4 / Dec 07, 2010 2:38pm

    NDC

    22 posts

    Sue, thanks for the wiki link. Dylan’s response was able to help me out and get me back on track.

  • #5 / Dec 07, 2010 5:44pm

    Ingmar

    29245 posts

    Very glad to hear it. Post again as needed, please.

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

ExpressionEngine News!

#eecms, #events, #releases