Question

I need to add an anchor to the links created by the standard Joomla paginator. In some places the website I'm working in has lots of content, and I want that when I click on the paginator, when the page is reloaded to be placed in my list.

So, what can I do to convert from "site.com/index.php?start=3" to "site.com/index.php?start=3#content"?

Was it helpful?

Solution

You have to create a pagination.php file inside your template's html folder to override the default output. You can find an example of this file in joomla3's protostar template inside templates/protostar/html/pagination.php where you can modify the line 180 that reads:

return "<li><a title=\"" . $item->text . "\" href=\"" . $item->link . "\" class=\"pagenav\">" . $display . "</a></li>";

and modifying it something like so: $item->link . "#content\"

More info on Pagination Links Overrides

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top