I am having problems getting pagination to work coherently and would appreciate some help.
I have a number of photo galleries. I am displaying a list of icons relating to these to the left of the page. Clicking on one shows the relevant gallery to the right. This works fine.
I have limited entries to 8 per page. Again works fine.
I have a pagination link at the bottom of the list. Works fine. I click on it and it shows me next items in list.
The issue I am having is that having selected a gallery on one page the url changes from http://www.garrybull.com/school/ to http://www.garrybull.com/school/room11/ as intended
If I then click on the pagination link The address turn into http://www.garrybull.com/school/room11/P8/. Room 11 is not listed on P8 and I would like the pagination button simply to go to http://www.garrybull.com/school/P8/ How can I control this?
The second issue I am having is that if I select a gallery from the p2 list. The gallery shown but I loose the P8 in the menu so the menu reverts to the P1 selection. This means I have a p2 gallery displaying with a p1 list.
Here is the relevant bit of the code I am using:
{if segment_2 != "" AND segment_2 != "P0" AND segment_2 != "P8"}
<div id="exhibition_title">Tai Tapu School Photographs, 2010</div>
{exp:channel:entries channel="school"}
{/exp:channel:entries}
<div id="flashcontent">
This SlideShowPro photo gallery requires the Flash Player plugin and a web browser with JavaScript enabled.
</div>
<div class="order">to order photographs please <a href="http://www.garrybull.com/resources/taitapu.pdf">download</a> and complete the application form
</div>
{if:else}
<div id="exhibition_title">Tai Tapu School Photographs, 2010
<div id="index_content">Please select a room to view related photographs</div>
</div>
{/if}
</div> <!--end right_wrapper-->
<div class="left_wrapper">
<div class="project_list">
<table class="project_list_table" id="myTable">
{exp:channel:entries channel="school" paginate="bottom" paginate_base="" orderby="date" sort="desc" limit="8" dynamic="off"}
{if url_title=="{segment_2}"}
<tr><td>http://www.garrybull.com/resources/school_thumbs/{url_title}.jpg</td></tr>
{if:else}
<tr><td><a href="http://www.garrybull.com/school/{url_title}">http://www.garrybull.com/resources/school_thumbs/grey/{url_title}_grey.jpg</a></td></tr>
{/if}
{paginate}
<tr><td id="pagination">{pagination_links}</td></tr>
{/paginate}
{/exp:channel:entries}Many thanks for your help.