ataman79
ataman79

Reputation: 31

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

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

Upvotes: 0

Views: 451

Answers (2)

fevangelou
fevangelou

Reputation: 324

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

Upvotes: 0

ataman79
ataman79

Reputation: 31

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

Upvotes: 0

Related Questions