I’m having trouble with Pagination displaying the proper current link and number of pagination pages on results generated from the EE2 Query module. Here’s the code that generates the links:
{exp:query sql="SELECT e.author_id AS author_id, m.screen_name as author FROM exp_channel_titles e INNER JOIN exp_members m ON e.author_id = m.member_id WHERE e.channel_id = 10 GROUP BY author_id ORDER BY author"}
<li>{if author_id == "1"}{if:else}{author}{/if}</li>
{/exp:query}
Here’s the code that sets the pagination atributes:
{exp:channel:entries channel="{my_channel}” orderby=“date” author_id=”{segment_3}” sort=“desc” limit=“12” disable=“member_data|trackbacks” paginate=“bottom”}
Here’s the code that renders the pagination:
{paginate}
<div id=“pagination-links” class=“clearfix”>{pagination_links}</div>
{/paginate}
in EE1, the pagination html is rendered as:
<div id="pagination-links" class="clearfix"><ul><li id="li-open"></li><li><strong>1</strong></li><li><a href="http://www.stretcher.org/archives/author/13/P12/">2</a></li><li><a href="http://www.stretcher.org/archives/author/13/P24/">3</a></li><li><a href="http://www.stretcher.org/archives/author/13/P12/">| Next</a></li><li id="end-pagination"><a href="http://www.stretcher.org/archives/author/13/P336/">| Oldest >> </a></li><li id="li-close"></li></ul></div>
in EE2, the pagination html is rendered as:
<div id="pagination-links" class="clearfix"><ul><li id="li-open"></li><li><a href="http://www.stretcher.org.php5-18.dfw1-1.websitetestlink.com/archives/author/13/P1">Prev |</a></li><li><a href="http://www.stretcher.org.php5-18.dfw1-1.websitetestlink.com/archives/author/13/">1</a></li><li class="active">2</li><li><a href="http://www.stretcher.org.php5-18.dfw1-1.websitetestlink.com/archives/author/13/P24">3</a></li><li><a href="http://www.stretcher.org.php5-18.dfw1-1.websitetestlink.com/archives/author/13/P36">4</a></li><li><a href="http://www.stretcher.org.php5-18.dfw1-1.websitetestlink.com/archives/author/13/P24">| Next</a></li><li id="end-pagination"><a href="http://www.stretcher.org.php5-18.dfw1-1.websitetestlink.com/archives/author/13/P336"> | Oldest >> </a></li><li id="li-close"></li></ul></div>
Live examples here:
EE1 - pagination display works
http://www.stretcher.org/archives/author/13/
EE2 - pagination display broken
http://www.stretcher.org.php5-18.dfw1-1.websitetestlink.com/archives/author/13/
Any help much appreciated!
Thanks!
David