Jump to content

Pagination links on result pages with CoreSEF all go to 1st page


Sebastian Schalipp

Recommended Posts

Hi,

 

when using CoreSEF and the hidden menue trick for categories, jReviews pagination URLs on listing or Click2Search result pages become something like

http://www.XXXXX.de/berlin/nightlife/tag/nightlifetyp/bars/cat:22/page:4/limit:10/

 

I had to modify Joomla's Menue Helper class because my client wanted three-level "talking" menue URLs like:

http://www.XXXXX.de/berlin/nightlife/bars/

 

This works fine, here is my problem:

 

In paginated result pages, this now produces pagination links like

http://www.XXXXX.de/berlin/nightlife/bars/tag/nightlifetyp/bars/cat:22/page:4/limit:10/

(note the new 3rd segment) where the "page:" parameter now is no longer at the 7th but at the 8th position.

 

This stops pagination from working, as the click on any page number will now only produce the first page. The pagination numbers still show, but all lead to the first page.

 

This led me to believe that the jReviews router or pagination helper is deconstructing the SEF url by "/"and expecting the "page:"-parameter at a certain position, so when it is now in the 8th segment of the string it is no longer found. Just by deleting one segement of the URL string (i.e. omitting the third segment "/bars/") pagination works again.

 

What I would like to do now is find the code where the "page:" parameter is drawn from the URL, and add a few lines that tell the script "if you can't find the page:X parameter on the 7th position, try the 8th". Coding this in PHP is not my problem, but finding the right script and function is.

 

I know this is a bit beyond the scope of support since it is my mod that broke the functionality, but maybe you could point me in the right direction? I have tried to understand jReviews' "router.php" and "/helper/pagination.php" classes, but I don't fully understand how they work and what would be the best position to apply my little fix.

 

Any help appreciated,

Sebastian

Link to comment
×
×
  • Create New...