- Posts: 43
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- K2 Sub-Category Ordering in Frontend Select Category pulldown
K2 Sub-Category Ordering in Frontend Select Category pulldown
- Railer
-
Topic Author
- Offline
- Senior Member
I have a K2 Categories menu item type pulling K2 Items from a specific parent category. On that page above the list of K2 item titles is a pulldown menu with a list of the sub-categories.
I have changed the order of the sub-categories in the backend to the way I want them and they display in that order in the Select Category pulldown menu on the K2 Items page (backend), but they do not display in the correct order in the front-end pulldown as described above.
How do I get the front-end pulldown display in the same order? (Not by ID).
I have gone into the parent category and set Sub-Category Handling > Sub-Category Ordering to "Ordering". But it doesn't show up in the list in the specific order I arranged them in.
The parent category is not inheriting parameters from any other category. And the sub-categories are all set to inherit from the parent category. And caching is not enabled.
How do I get this to work?
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Railer
-
Topic Author
- Offline
- Senior Member
- Posts: 43
It's a long series of panes. In the parent category, under Other Layout Options, Item Ordering is set to "Ordering"; in Sub-Category Handling, Sub-category Ordering is set to "Ordering". (Maybe I need to set each child category separately?)
In the Menu item, under Options, the Layout options for single category selection Item ordering is set to, "Inherit from Category"; Layout options for multiple category selection Select a template is set to: "Use Default"; Item Ordering is also set to "Default". Changing it to "Ordering" does not save, and reverts to "Default".
Is that enough information or do you need more, and if so, please let me know what to send?
It occurs to me that maybe I could create a custom K2 template override for my front-end K2 Categories menu page to accomplish this ordering of the pulldown select list items?
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Railer
-
Topic Author
- Offline
- Senior Member
- Posts: 43
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Railer
-
Topic Author
- Offline
- Senior Member
- Posts: 43
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
You originally said that "On that page above the list of K2 item titles is a pulldown menu with a list of the sub-categories."... How did you get that pulldown menu (I assume you mean drop-down)? Are you using the K2 Tools module?
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Railer
-
Topic Author
- Offline
- Senior Member
- Posts: 43
Yes, it does look like there is a K2 Tools module on this page set to the Search Box module functionality. I've uploaded 2 screenshots showing what look like the panes related to the category pull-down. Please let me know if you need to see other panes in this module. I did try to set the category in the Category List (Menu) pane to the Resource Library parent category, and the order filter to "Ordering" but nothing changed so I reverted to the original settings shown. Caching is NOT enabled for this site.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Railer
-
Topic Author
- Offline
- Senior Member
- Posts: 43
Yes, the root category used for the data source is ordered the way we want it. However, there are template overrides in the template.
I'm not sure which files to grab for you, but I grabbed the beginning of the category.php override which contains an ordering switch and have uploaded the screenshot. I'm not sure which would be the correct syntax to use if I changed it, but I do note the following in the default:
$orderby = 'i.id DESC';
Would that be the cause?
Further down in the file, I see a div for what looks like a category filter pulldown... which is the second screenshot attachment.
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
The code at the top does not relate to the one in the bottom, which is apparently the drop-down. You need to sort the SQL query by ordering. So prepend:
$query2->order('ordering');
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Railer
-
Topic Author
- Offline
- Senior Member
- Posts: 43
Please Log in or Create an account to join the conversation.
- JoomlaWorks
-
- Offline
- Admin
- Posts: 6227
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- K2 Sub-Category Ordering in Frontend Select Category pulldown