Keyword

Sort the K2 items in a category by extra fields

  • Jeroen van Dijk
  • Jeroen van Dijk's Avatar Topic Author
  • Offline
  • New Member
More
13 years 7 months ago #93847 by Jeroen van Dijk
Sort the K2 items in a category by extra fields was created by Jeroen van Dijk
Hello Everyone,

 

I have created a custom K2 template which wasn't hard at all :)

I seem to be missing something though.  On a certain point in the site i list all the items in a category. These items all have an extra field called "event_date". I would like to make some sort of sorting mechanism that sorts the items in this category by this custom field. This isn't implemented in the core is it ?

I would know a way to do it by sending a parameter to the model and thus hacking the core, but as most of you know this creates some hassle with updating. Does anyone know a smart plugin-ish way to do this?

Kind Regards,

 

Jeroen van Dijk

 

 

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

More
13 years 7 months ago #93848 by Next Wave, Inc.
Replied by Next Wave, Inc. on topic Sort the K2 items in a category by extra fields
I have read several posts like this, looking for the same, and it seems that it's far from trivial, otherwise there would be a ready solution, and it would even be part of the core K2.

 

Jiliko.net has an extension that allows some sorting.

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

More
13 years 7 months ago #93849 by BBC
I noticed this one is missing. Something as Sobi2 has, sorting mechanism above Items.

Try to put some module in a position above Items in Category. I have seen some modules with sorting option.

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

More
13 years 7 months ago #93850 by Next Wave, Inc.
Replied by Next Wave, Inc. on topic Sort the K2 items in a category by extra fields
Yeah, the issue seems to relate to the way the Extra Fields are stored together instead of as separate database fields.  It's efficient, but less flexible for sorting, since you have to load and parse all the Extra Fields to know what goes where.

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


Powered by Kunena Forum