joomlapaginationjoomla-k2

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


Solution

  • 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