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.

Entries displaying twice?

September 17, 2009 5:13pm

Subscribe [1]
  • #1 / Sep 17, 2009 5:13pm

    techops

    18 posts

    I can’t figure out why my page is displaying my content twice. I have the limit set but it seems to ignore that. I am using similar code on another site and it seems to work just fine. I can’t understand why this would have a problem.

    My URL structure is: http://www.mysite.com/{cat_url_title}/{url_title}/

    Here’s my code:

    {if segment_1 != "" AND segment_2 != ""}
            {exp:query sql="SELECT cat_id FROM exp_categories WHERE cat_url_title = '{segment_1}'"}
                {exp:weblog:entries weblog="store_products" limit="1" url_title="{segment_2}" disable="trackbacks|pagination|member_data" }
                    <div class="grid_3 alpha productImage">
                        <a href="#">{prod_image}</a>
                    </div>
                    <div class="grid_10 omega">
                        {title}
                   </div>
                {/exp:weblog:entries}    
            {/exp:query}        
        {/if}

    Any thoughts would be greatly appreciated.

    Thanks!

  • #2 / Sep 17, 2009 5:19pm

    Ingmar

    29245 posts

    What version and build are you using? Do you’ve got a link? To be honest, I am not entirely following your code: You are querying “cat_id” without using it again? What’s the purpose of your setup here?

  • #3 / Sep 17, 2009 5:25pm

    techops

    18 posts

    Build:  20090723

    Please excuse the lack of design to the page, I’m working on the programming first.

    Here’s the page having the problem:

    http://techmark.webfactional.com/books/devo2go_audio_devotional/

    I’m following the tips from this entry here:
    http://fortysevenmedia.com/blog/archives/setting_up_custom_category_url_structures_in_expressionengine/

    to set up my “custom” url structure based off the categories.

    When I say I’ve done this before, is that on: http://www.outreachpublishing.com/ I did the similar set up in a template group, but this time I want to have it one level higher and remove the “products” from the URL and have it off the root.

    Am I making sense?

  • #4 / Sep 17, 2009 5:26pm

    techops

    18 posts

    maybe the sql query is throwing it off?

    EDIT: yep, that was it! sorry about all that 😊

  • #5 / Sep 17, 2009 5:31pm

    Ingmar

    29245 posts

    So, you’re all set for now, then?

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

ExpressionEngine News!

#eecms, #events, #releases