Joomla K2 change pagination titles by adding number of the page to the pagination

428 Views Asked by At

Can you tell me how can I add custom title to the pagination title in K2 On all pages (1,2,3 etc.) the title is the same, and I want to add Page1, Page2, etc., so the titles to become like this: title+Page1, title+page2, etc

2

There are 2 best solutions below

0
ataman79 On BEST ANSWER

OK, I found a solution, so hope it will be useful for others too :)

In the file /components/com_k2/views/itemlist/view.html.php

Find Line 196:

// Set title
$title = $category->name;

and change to:

// Set title
$titlesuffix = ' Page #' . (intval($limitstart/$limit)+1);
$title = $category->name . $titlesuffix;

You can use this code for tag pagination, metadescription. Just search the needed lines in the same file

1
fevangelou On

Until this is sorted permanently by being part of the code (as it makes sense), here's a cleaner solution that does not require changing core K2 code: https://github.com/getk2/k2/issues/539