Keyword

Multiple Category Menu Item Layout order??

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 10 months ago #91250 by Odin Mayland
Multiple Category Menu Item Layout order?? was created by Odin Mayland
I can not get the items to be ordered per the "K2 Items" list when I select multiple categories for a Category Menu Item.

1. I have 3 Child categories selected.  Neurology Staff, Specialty Staff, and Office Staff
2. I have "Order" selected for Item ordering  (See attached)
3. The items are not in the "Order" of the "K2 Items" list.  (See attached, "K2 Item Order")
4. The order on the page is all mixed up.
See attached screen shot for thebrainpro.com/test/index.php?option=com_k2&view=itemlist&layout=category&Itemid=426

How do I get this Menu Item "Our Staff" to order the Items in the same order as the attached "k2 item order" screen shot?
Attachments:

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 9 months ago #91251 by Odin Mayland
Replied by Odin Mayland on topic Multiple Category Menu Item Layout order??
1. Is there anything else I can do to explain this issue?
2. Am I doing something wrong or is this a problem with k2?

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

More
13 years 9 months ago #91252 by matthew turner
Replied by matthew turner on topic Multiple Category Menu Item Layout order??
Hi,
I just had to do a multi category menu page for a client, could not work out why items were displaying out of "order" sequence...(Other K2 sites I have built were sorted by Date, or order was unimportant)
I worked out that the items are displayed in order, but the Category plays no part in the ordering/display order so :
item A (order #1) Category X
item B (order #2) Category X
item C (order #1) Category Y

It would display item A, then item C, then item B (order is literal 1,1,2 ?)

Time constraints have lead me to this flexible/easy workaround....
To display "Combined Category X & Y"
Use Single Category Menu item,
Filter param set to Category X,
Download/Install Mod K2 Content (Tag Version)
In Mod K2 Content Module (params set to filter by category : Category Y,
Order set to : order,
and Display on Menu Item :"Combined Category X & Y")
Hope this helps ( I am using the Mod K2 Content (Tag Version) for more than this as it can be styled to suit the rest of the site.....)

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 9 months ago #91253 by Odin Mayland
Replied by Odin Mayland on topic Multiple Category Menu Item Layout order??
I will try and mimic your workaround for now.

I hope this discussion is viewed by the developers so that they can see it is an issue for more then just myself.

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 9 months ago #91254 by Odin Mayland
Replied by Odin Mayland on topic Multiple Category Menu Item Layout order??
BUG?: Unless someone posts an answer, I have to assume this is a bug or other design problem that needs to be resolved.

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

More
13 years 9 months ago #91255 by matthew turner
Replied by matthew turner on topic Multiple Category Menu Item Layout order??
Hi,
I have had a couple of hours to try a few things out to "fix" this...
It does involve one VERY small change in a CORE file - You must remember to re do this change if you update K2 to next version... (I did this myself during testing this "fix" today and wiped out a couple of other bits I was working on - I forgot to back up - Doh!)
Also I am sure there will be a better fix but this works for me (k2 v 2.4.1)
Fix ALL itemlist pages - order by Category, and then order by Item Ordering !) - Works on Tag pages too

Edit around line 235 in :
components/com_k2/models/itemlist.php

case 'order':
if (JRequest::getInt('featured') == '2')
$orderby = 'i.featured_ordering';
else
// $orderby = 'i.ordering';
// ORDER by i.catid or category Ordering then Item Ordering ? Edited by This email address is being protected from spambots. You need JavaScript enabled to view it.
$orderby = 'c.ordering,i.ordering';

I have tried this with c.catid which might also suit your project...

Also I tested the items also display in Category ordering - and in Item ordering so I made category params set to display Item Order by "order" too....

Please let me know if this helps - I am not a coder - I try to learn as I go, and want to give a little back to the K2 community.

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

  • Odin Mayland
  • Odin Mayland's Avatar Topic Author
  • Offline
  • Platinum Member
More
13 years 9 months ago #91256 by Odin Mayland
Replied by Odin Mayland on topic Multiple Category Menu Item Layout order??
PERFECT! your new code fixed it! I hope one of the developers see this and fix this bug in the next release after 2.4.1

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

More
13 years 9 months ago #91257 by matthew turner
Replied by matthew turner on topic Multiple Category Menu Item Layout order??
Glad it worked for you too!

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

More
13 years 9 months ago #91258 by Simon Wells
Replied by Simon Wells on topic Multiple Category Menu Item Layout order??
Thanks Jeff for taking the time to let me know about this and thanks to Mat for a fix.

As explained to Jeff, my new K2 template demo uses multiple cats in a menu link, but I have not tested for this issue, but will.

I have submitted this post as a bug report and the fix may be included in a following beta release, if approved.

Thanks again.

Simon
K2 Support

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

More
13 years 9 months ago #91259 by JoomlaWorks
Replied by JoomlaWorks on topic Multiple Category Menu Item Layout order??
We've noted this as a possible bug to investigate. Thanks for mentioning about it.

Fotis / 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