EllisLab text mark
Advanced Search
     
limit parameter returning no entries
Posted: 07 August 2012 01:30 PM   [ Ignore ]
Avatar
Joined: 2010-07-03
21 posts

very stumped.

{exp:channel:entries channel="body" dynamic="no" orderby="title" sort="desc"

works fine. returns all entries.

{exp:channel:entries channel="body" dynamic="no" orderby="title" sort="desc" limit="5"

returns nothing. I’m not sure what’s going on. Here’s the full code:

<div class="clear lightgrey_div">/div>
<
div class="clear green_div">/div>
<
div class="darkgrey_div footer t4">
      <
div
          <
div class="whitetext left">
              <
a href="/index.php/main/about-us/">
      
about
     
</a>
     <
ul>
     
{exp:channel:entries channel="body" dynamic="no" }
      {if footer_submenu
=="About"}
       
<li>
        <
a href="/index.php/main/{url_title}/">
         
{title}
        
</a>
       </
li>
      
{/if}
      {
/exp:channel:entries}
     
</ul>
          </
div>
          
          <
div class="whitetext left ">
              <
a href="/index.php/main/our-wines/">
      
wines
     
</a>
     <
ul>
     
{exp:channel:entries channel="body" dynamic="no" orderby="title" sort="desc" limit="5"}
      {if footer_submenu
=="Wines"}
       
<li>
        <
a href="/index.php/main/{url_title}/">
         
{title}
        
</a>
       </
li>
      
{/if}
      {
/exp:channel:entries}
     
</ul>
          </
div>
          
          <
div class="whitetext left ">
              <
a href="/index.php/main/events/">
      
events
     
</a>
     <
ul>
     
{exp:channel:entries channel="body" dynamic="no" }
      {if footer_submenu
=="Events"}
       
<li>
        <
a href="/index.php/main/{url_title}/">
         
{title}
        
</a>
       </
li>
      
{/if}
      {
/exp:channel:entries}
     
</ul>
          </
div>
          
          <
div class="whitetext left ">
              <
a href="/index.php/main/trade-media/">
      
trade/media
     
</a>
     <
ul>
     
{exp:channel:entries channel="body" dynamic="no" }
      {if footer_submenu
=="Trade Media"}
       
<li>
        <
a href="/index.php/main/{url_title}/">
         
{title}
        
</a>
       </
li>
      
{/if}
      {
/exp:channel:entries}
     
</ul>
          </
div>
          
          <
div class="whitetext left textright">
              <
div>
                  
search box
              
</div>
              <
div class="clear"></div>
              <
div class="greentext  t3">
                  <
a href="#">
      
About
     
</a>
       | 
     <
a href="#">
      
Wines
     
</a>
       | 
     <
a href="#">
      
Events
     
</a>
        | 
     <
a href="#">
      
Wine Club
     
</a>
        | 
     <
a href="#">
      
Trade/Media
     
</a>
        | 
     <
a href="#">
      
Shop
     
</a>
        | 
     <
a href="#">
      
Contact
     
</a>
                  <
br />
                  
Sweet Cheeks Winery 2012. All Rights Reserved.
                  <
br />
                  
1-877-309-WINE (9463) or 1-541-349-WINE (9463)
                  <
br />
                  <
br />
                <
a href="#" target="_blank">
      
Like us on Facebook
     
</a>
       | 
     <
a href="#" target="_blank">
      
Follow us on Twitter
     
</a>
              </
div>
          </
div>
          
          <
div class="clear"></div>
          
          <
div class="whitetext  left">
              <
a href="/index.php/main/wine-club/">
      
wine club
     
</a>
          </
div>
          
          <
div class="whitetext left ">
              <
a href="/index.php/main/contact-us/">
      
contact
     
</a>
          </
div>
          
          <
div class="whitetext left t_5">
              <
a href="#">
      
shop
     
</a>
          </
div>
          <
div class="clear"></div>
      </
div
  </
div
 Signature 

The more I learn the less I know.
Revoalution.com

 
Posted: 07 August 2012 01:49 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2010-07-03
21 posts

never mind. figured it out. if anyone else stumbles across this, the solution is as follows.

<ul>
     
{exp:channel:entries channel="body" dynamic="no" orderby="title" sort="desc" limit="5"}
      {if footer_submenu
=="Wines"}
       
<li>
        <
a href="/index.php/main/{url_title}/">
         
{title}
        
</a>
       </
li>
      
{/if}
      {
/exp:channel:entries}
     
</ul

doesn’t work because it loops through the first 12 body channel entries based on name. if foot_submenu doesn’t = wines, non of them will display. the desired behavior was to display the first 12 where footer_submenu = wines. because that field is a dropdown, I can use:

<ul>
   
{exp:channel:entries channel="body" search:footer_submenu="Wines"  orderby="title" sort="desc" dynamic="no" limit="8"}
      
<li>
   <
a href="/index.php/main/{url_title}/">
      
{title}
   
</a>
      </
li>
   
{/exp:channel:entries}
</ul

this is also a very good method for making css menus on the fly btw. particularly functional with the playa module. you can make dynamic drop downs with several tiers this way.

 Signature 

The more I learn the less I know.
Revoalution.com