0

In our site we have a news section, where we are showing a list of 10 news per page.

The pagination is created OK, but when I click on page number link it creates urls like http://example.com/news/P10 we want to change it to something more readable by users and Google as http://example.com/news/page=1, http://example.com/news/page=2 something like this.

We tried a few plugins but most of the plugins are out-dated and doesn't work.

Can anyone please tell us the correct way to fix this?

1 Answer 1

0

Have you tried:

If they don't work for you, then you'll have to write your own extension, possibly using the above as reference to approach.

Update

You do not want to update the core - problematic for future updates. Ideally you'd need to write an extension that probably used 2 hooks Pagination and session. Session to interpret the custom paginated element and the Pagination hook to output the formatted pagination segment you want. You might need the channel hook to query result.

If you really do want to dip into the core:

  • system/expressionengine/libraries/EE_Pagination.php

and/or

  • system/codeigniter/system/libraries/Pagination.php
3
  • I tried oth but they didn't worked and was nto showing/doing anything. We are running latest version of EE, and those plugins looks old, so maybe why they are nto working? Any suggestion on what to modify/overwrite in core to achieve this?
    – djmzfKnm
    Commented Sep 17, 2015 at 9:01
  • Have updated answer to include the basic information. Commented Sep 17, 2015 at 13:19
  • Please follow @PeterLewis's advice and do not screw with the core files. If you are a developer (or have one hired) that is worth their salary, they can fix this with a custom extension.
    – jrothafer
    Commented Sep 17, 2015 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.