Keyword

k2 display categories

  • James Lee
  • James Lee's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #59303 by James Lee
k2 display categories was created by James Lee
Hi,
currently i have a problem display 2 categories, I would to display only the title of 2 main categories and also their sub categories.

I have attached a image to show what i wanted please help me how ? I'm only able to display single categories and their categories not 2 categories
Attachments:

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 10 months ago #59304 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: k2 display categories
Hi James,

I don't really understand what you're trying to achieve here. but are you trying to display 2 categories in a single menu ? Meaning when i click the menu Product, then i see Sports and Style ?

K2 Rocks \m/

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

  • James Lee
  • James Lee's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #59305 by James Lee
Replied by James Lee on topic Re: k2 display categories
Oh yes, you are right i'm trying to get that is it possible?

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

More
12 years 10 months ago #59306 by Jiliko.net
Replied by Jiliko.net on topic Re: k2 display categories
Hi,

What you can do is :
  • creating a parent category for your Sports & Style categories
  • creating a menu item pointing to this parent
  • overriding the K2 template (check my signature for link)
  • updating the category.php to display each category with items just below

Olivier

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

  • James Lee
  • James Lee's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #59307 by James Lee
Replied by James Lee on topic Re: k2 display categories
Sorry which file should i download ?

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

  • James Lee
  • James Lee's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #59308 by James Lee
Replied by James Lee on topic Re: k2 display categories
Can you also show me the link and how to do the editing not the category.php

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

More
12 years 10 months ago #59309 by Jiliko.net
Replied by Jiliko.net on topic Re: k2 display categories
Hi,

You have nothing to download, everything you need is already on your website.

Follow instructions here : getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates

When this is done, you have to edit the category.php file from your new K2 template and do some php stuff to reorganize your categories/items.

Let's say you have set the layout to display all items from the parent category (catalog mode = No), with sub categories, and all items as secondary. You have to parse your item array to reorganize it per category (Sports, Style) and after that, parse this new array and display for each category, the category info and specific items.

Olivier

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

  • James Lee
  • James Lee's Avatar Topic Author
  • Offline
  • New Member
More
12 years 10 months ago #59310 by James Lee
Replied by James Lee on topic Re: k2 display categories
Hi,
thanks i have learn something about the template and i do understand but i wanted to show sub -sub category which i could not find the code or do i have to write another php code to show?


Attachment not found

Attachments:

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


Powered by Kunena Forum