Keyword

[SOLVED] K2 pagination in random itemlist

More
10 years 11 months ago #119433 by Marco
Hi all , when i use a random ordering in k2 category the pagination is not working well... every time i change page the article are loaded again in a random way

so for example in the firs page i see :
article 1
article 2
article 8

in the second i see
article 3
article 8
article 2

so the random case is loaded with the page....
how can i resolve that ?
pls help

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #119434 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 pagination in random itemlist
Change the pagination to something other than random. Random means every page loads a random sets of items.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #119435 by Marco
Replied by Marco on topic Re: K2 pagination in random itemlist
i cant , i need a random pagination.
i ve tried this hack getk2.org/community/New-to-K2-Ask-here-first/150860-Random-catalog-and-pagination but is not working...
any other ideas to solve the problem ?

Please Log in or Create an account to join the conversation.

More
10 years 9 months ago #119436 by Marco
Replied by Marco on topic Re: K2 pagination in random itemlist
ok i find the solution ...

in itemlist.php located in com_k2/models ( verison 2.6.8 DEV BUILD )

replace at line 330 the case 'rand' with that :

case 'rand':
$currentSession =& JFactory::getSession();
$sessionNum = substr(preg_replace('/[^0-9]/i','',$currentSession->getId()),2,3);
$orderby = 'RAND('.$sessionNum.')';
break;

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum