- Posts: 18
COMMUNITY FORUM
Latest Items Menu Component Sorting options
- caseyz
-
Topic Author
- Offline
- New Member
Less
More
11 years 1 week ago #128303
by caseyz
Latest Items Menu Component Sorting options was created 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.
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.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
11 years 1 week ago #128304
by Lefteris
Replied by Lefteris on topic Re: Latest Items Menu Component Sorting options
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.
Please Log in or Create an account to join the conversation.
- caseyz
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 18
11 years 4 days ago #128305
by caseyz
Replied by caseyz on topic Re: Latest Items Menu Component Sorting options
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
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.
- Lefteris
-
- Offline
- Platinum Member
Less
More
- Posts: 8743
11 years 3 days ago #128306
by Lefteris
Replied by Lefteris on topic Re: Latest Items Menu Component Sorting options
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.
Please Log in or Create an account to join the conversation.