rsanchez / dynamo

Makes Dynamic Parameters behave more like the Search module.
http://devot-ee.com/add-ons/dynamo/
10 stars 2 forks source link

Results outputting one per page! #20

Closed allisonbaxter closed 11 years ago

allisonbaxter commented 11 years ago

I am using the dynamo addon to manage pagination on a template where the member information is being output in a grid form. This works fine on other templates using exactly the same code. Except for one thing... This time I only want to output information on members who are logged in online. This results in the members being output to individual pages instead of displaying 12 to a page. i have tried placing the query in various places but nothing seems to work. Here's the basic code:

{exp:dynamo:form return="new" search_id="{segment_2}"}
<label for"group_id">Gender:</label>       
    <select name="group_id">    
        <option value="7|8">All</option>
        <option value="7"{if limit == 7} selected="selected"{/if}>Male</option>
        <option value="8"{if limit == 8} selected="selected"{/if}>Female</option>
    </select>
<button>SUBMIT</button>   
{/exp:dynamo:form}     
{exp:dynamo:entries channel="zoo_visitor" dynamic_parameters="group_id" 
   search_id="{segment_2} "limit="12"}
 {exp:query sql="SELECT member_id FROM exp_sessions WHERE member_id =     '{member_id}' LIMIT 1"}
  {if member_id}  
  {paginate}{clear}<div class="messagebar">{if previous_page}<a href="{auto_path}"> 
   «Previous Page</a> &nbsp;{/if}
    {if next_page}<a href="{auto_path}">Next Page »</a>{/if}
    <span class="grid-right">{pagination_links}</span></div>{clear}{pad}{/paginate} 
    <div class="{switch='grid-item|grid-item|grid-item|grid-item last'}">
  <a href="/memberprofile/{member_id}">{member_firstname} {member_lastname}</a>                                      </div>     
{/if}  {/exp:query} 
 {/exp:dynamo:entries}