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.

weblog limit parameter giving inconsistent results

August 30, 2007 3:42pm

Subscribe [1]
  • #1 / Aug 30, 2007 3:42pm

    django6

    124 posts

    When I change the limit parameter to 3, it lists no entries, but when I change it to 12, it gives 3 entries. What do you think is going on here?


    <div class=“right2”>
          <div class=“headline-right”>Articles</div>
          <ul>
            {exp:weblog:entries weblog="Resources" sort="desc" limit="12" orderby="Date" dynamic="off"}
              {if ResourceType == "Article"}
                  <li class=“right-bullets-triangle-r”>{title}</li>
              {/if}
            {/exp:weblog:entries}
          </ul>
    </div>  <!—end right2—>

  • #2 / Aug 30, 2007 3:44pm

    Lisa Wess

    20502 posts

    If you get rid of that conditional, does it work?  The problem is that the limit is occurring and giving you what you want, but you are hiding the results with that conditional and only showing ones that match, not all of the ones as specified by the parameters.

  • #3 / Aug 30, 2007 3:55pm

    django6

    124 posts

    Of course! How do I restrict the results to give me the correct limit?  Can I put the conditional inside the weblog parameter list?

  • #4 / Aug 30, 2007 3:56pm

    Lisa Wess

    20502 posts

    No, you can’t.  There isn’t a built-in feature for this, but you might head to the extensions forum and look at the Custom Fields in weblog entries extension, by Mark Huot.

  • #5 / Aug 30, 2007 5:00pm

    django6

    124 posts

    someone mentioned using the query module to solve this problem.  Do you think that would work for my particular problem?  I’m okay with doing SQL, but I’m not sure how the underlying tables are setup and labelled since EE hides all that stuff.

  • #6 / Aug 30, 2007 5:21pm

    Lisa Wess

    20502 posts

    That should be fine if you are familiar with writing queries.  You might want to post in the How To forum with your goal to see what ideas people have. I suspect they’ll send you to that extension, though. =)

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

ExpressionEngine News!

#eecms, #events, #releases