- Posts: 87
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Display sub-categories of parent category in category view
Display sub-categories of parent category in category view
- Michael Yaeger
- Topic Author
- Offline
- Premium Member
Less
More
9 years 2 months ago #140768
by Michael Yaeger
Display sub-categories of parent category in category view was created by Michael Yaeger
I have created a custom template for the category view that I am assigning to the LAST category in a tier. At the bottom of this template, I want to show all other sibling categories within the parent's category. This would be very similar to how the category shows the name, image, and description of its child categories, only I want the SIBLING categories, NOT CHILD.
How can I go about showing these other sibling categories on a category page?
How can I go about showing these other sibling categories on a category page?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
9 years 2 months ago #140772
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Display sub-categories of parent category in category view
A custom mod_menu or a K2 Tools module (category listing) would be an appropriate solution.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Michael Yaeger
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 87
8 years 11 months ago - 8 years 11 months ago #144308
by Michael Yaeger
Replied by Michael Yaeger on topic Display sub-categories of parent category in category view
Is there a way to do this without using a module? Or, can I call a "universal" module from the category.php template that updates its contents based on the current category page loaded?
Last edit: 8 years 11 months ago by Michael Yaeger.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 11 months ago #144325
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Display sub-categories of parent category in category view
The quickest method would be the module. You would otherwise have to query the database, load the results and display the results after you find each category's route.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Michael Yaeger
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 87
8 years 10 months ago #144415
by Michael Yaeger
Replied by Michael Yaeger on topic Display sub-categories of parent category in category view
So, can I call a "universal" module from the category.php template that updates its contents based on the current category page loaded?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 10 months ago #144425
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Display sub-categories of parent category in category view
It is possible. This has to be custom PHP code though.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Michael Yaeger
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 87
8 years 10 months ago #144441
by Michael Yaeger
Replied by Michael Yaeger on topic Display sub-categories of parent category in category view
I'm already creating custom code for the K2 template. Can you give more info on how to achieve this?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 10 months ago #144464
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Display sub-categories of parent category in category view
You have to manually query the db and depending on the ID of the category you have to display the categories where the "parent" cell matches the ID of that category.
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
- Display sub-categories of parent category in category view