Keyword

Featured articles ordering from different categories

  • Gianluca
  • Gianluca's Avatar Topic Author
  • Offline
  • Junior Member
More
1 month 4 days ago #177684 by Gianluca
Hello, i have a category with several subcategories. I've set to show "featured first" so in the main category all the featured articles from the various subcategories are shown first, and that's ok.
The problem is that i cannot order those featured articles list.
If, in the backend, i set a filter to show "featured only" i have the possibility to order them (drop up and down even if in different categories), but any order i give it's ignored in fronted.
Is there a way to set the featured first order in frontend to follow articles order of backend? (as i have featured articles more important than other featured articles).
Thanks!

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 10 hours ago #177743 by Fotis
This is really an edge case.

To achieve what you want you can modify the itemlist model (in /components/com_k2/models/itemlist.php) around line 297 from this:
            case 'featured':
                $orderby = 'i.featured DESC, i.created DESC';
                break;

to this:
            case 'featured':
                $orderby = 'i.featured_ordering, i.created DESC';
                break;

Note down the change to re-apply it after upgrading in the future.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 10 hours ago #177744 by Fotis
I'll see if I can add this as an extra ordering option in an upcoming K2 release.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Gianluca
  • Gianluca's Avatar Topic Author
  • Offline
  • Junior Member
More
3 weeks 9 hours ago - 3 weeks 9 hours ago #177772 by Gianluca
Great! Thank you for both of your answers

Fotis wrote: I'll see if I can add this as an extra ordering option in an upcoming K2 release.


I think this would be a great option. I think ordering the featured is vital in a content website (in example: an online newspaper. There are always more important news, and if you have 2/3 important news is vital to orer them from the most important to the less).
Last edit: 3 weeks 9 hours ago by Gianluca.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 8 hours ago #177775 by Fotis
To be honest, some times it makes more sense to use a combination of a module and a component view. So you get the featured ones in the module, with whatever ordering you like and then everything else follows below in the component view (where you can easily filter out the featured items, so you don't get duplicate content).

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Gianluca
  • Gianluca's Avatar Topic Author
  • Offline
  • Junior Member
More
3 weeks 7 hours ago #177779 by Gianluca
I was thinking about this solution, the problem is that then i have problems with pagination (if there are a lot of featured articles they are not paginated), and if i just use the pagination for the "normal" list, the module will show up in every pages of the list

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 7 hours ago #177782 by Fotis
If there are lots of featured items, then you need a different view - that's for sure.

"...if i just use the pagination for the "normal" list, the module will show up in every pages of the list..."
Well, isn't that the point of "featuring" something?

Again, it's all a matter of preference.

That was my 2 cents on the matter.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • Gianluca
  • Gianluca's Avatar Topic Author
  • Offline
  • Junior Member
More
2 weeks 6 days ago #177794 by Gianluca
It depends... if someone see 3 articles and click on "next" page i assume he's not interested to those 3 articles and want to see more... anyway i see your point of view. For my case your hack is perfect. Thanks again

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 6 days ago #177803 by Fotis
You're welcome.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum