Keyword

Latest Items Menu Component Sorting options

  • caseyz
  • caseyz's Avatar Topic Author
  • Offline
  • New Member
More
10 years 4 months ago #128303 by caseyz
Is there any way to adjust the item ordering (not category ordering), within the K2 Latest News Component?

I've needed this option many times while creating a page for a client, especial menus and catalogs. The ultimate output would be similar to the default "k2 Latest News" Menu item, with blocks of items under their specific Category. The only difference would be the ability to order the items within each category differently, instead of by "latest". I know its called the "latest news". But I can't seem to find anything else that can accomplish this task simply. I mean, its only 1 additional parameter. If there was a way for force the ordering in an override, or adjust the component settings, anything.

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

More
10 years 4 months ago #128304 by Lefteris
Hi. There is no option for that. The code that fetches the items is located at line 118 of components/com_k2/views/latest/view.html.php. However it is not recommended to hack core K2 files.

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

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

  • caseyz
  • caseyz's Avatar Topic Author
  • Offline
  • New Member
More
10 years 4 months ago #128305 by caseyz
Awesome, that worked great, but yeah, hacking the core always sucks. Do you know of any reason why the sorting option is absent from this component (other than the obvious name or the component), or if it could maybe be added in the future? Just seems like it would make it that much more capable, while only adding a single parameter that could always be defaulted to latest.

There seems to be at least a dozen modules out there that accomplish this task (mostly paid, and a bit too bloated), so I know I'm not the only one that has a need for this function.

-Thanks

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

More
10 years 4 months ago #128306 by Lefteris
You can always copy the entire "latest" view folder and create your own variation without hacking core files. We always try to hear what people have to say about K2. However i cannot promise anything now. Thank you for your great feedback.

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

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


Powered by Kunena Forum