Keyword

Sub-category ordering

  • Markus Thiel
  • Markus Thiel's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 8 months ago #71848 by Markus Thiel
Sub-category ordering was created by Markus Thiel
Hi,

I have a site in swedish and the Sub-category ordering dont work properly.. we have the letters å,ä,ö last in our alphabet but the sorting in k2 treats eg ö like o.. and fix for this?

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

More
15 years 8 months ago #71849 by Lefteris
Replied by Lefteris on topic Sub-category ordering
Hi. This is the way MySQL sorts the rows. Of course you can perform sorting using the BINARY operator which performs a case sensitive sorting but i m not sure that this will solve your problem.

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

  • Markus Thiel
  • Markus Thiel's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 8 months ago #71850 by Markus Thiel
Replied by Markus Thiel on topic Sub-category ordering
Is there some changes I can do in the mysql database to fix this?

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

More
15 years 8 months ago #71851 by Lefteris
Replied by Lefteris on topic Sub-category ordering
I would suggest to try first the trick with the BINARY operator. Open the file components/com_k2/itemlist.php and change line 210 from:
$query .= " ORDER BY ".$orderby;
to:
$query .= " ORDER BY BINARY ".$orderby;

Please let me know if this worked.

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

  • Markus Thiel
  • Markus Thiel's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 8 months ago #71852 by Markus Thiel
Replied by Markus Thiel on topic Sub-category ordering
I dont have that file.. in that folder there are only k2.php and router.php

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

  • Markus Thiel
  • Markus Thiel's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 8 months ago #71853 by Markus Thiel
Replied by Markus Thiel on topic Sub-category ordering
perhaps in the controller folder?

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

  • Markus Thiel
  • Markus Thiel's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 8 months ago #71854 by Markus Thiel
Replied by Markus Thiel on topic Sub-category ordering
Found it... "components/com_k2/models/"

But no luck :(

Markus Thiel said:perhaps in the controller folder?

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

More
15 years 8 months ago #71855 by Lefteris
Replied by Lefteris on topic Sub-category ordering
Sorry for the mistake. The file is components/com_k2/models/itemlist.php. If that doesn't work then it's a MySQL issue. Obviously sorting works the same for com_content and other extensions.

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

  • Markus Thiel
  • Markus Thiel's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 8 months ago #71856 by Markus Thiel
Replied by Markus Thiel on topic Sub-category ordering
Sorting works in joomla but not k2?

Lefteris Kavadas said:Sorry for the mistake. The file is components/com_k2/models/itemlist.php. If that doesn't work then it's a MySQL issue. Obviously sorting works the same for com_content and other extensions.

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

  • Markus Thiel
  • Markus Thiel's Avatar Topic Author
  • Offline
  • Premium Member
More
15 years 8 months ago #71857 by Markus Thiel
Replied by Markus Thiel on topic Sub-category ordering
Can I change the database or something to make it work? :)

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

More
15 years 8 months ago #71858 by Lefteris
Replied by Lefteris on topic Sub-category ordering
You should get the exact same sorting in Joomla! with K2. If not then we have to do some more research...

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

More
15 years 2 months ago #71859 by Linda Cronsten
Replied by Linda Cronsten on topic Sub-category ordering
Did you sort this out? I had the same problem with Sobi2 and managed to fix it via the database ordering.

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


Powered by Kunena Forum