Keyword

How to display subcategories without showing main Category

  • Helio Alves
  • Helio Alves's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #82980 by Helio Alves
Hi Everyone,
I just got my hands on K2 a couple of hours ago and I created a product gallery and here's what I have.

I created a main category "Plants" and then I created 3 sub-categories that inherit from main category.
So it's some thing  like this
| Plants
-- | Sub Category 1
-- | Sub Category 2
-- | Sub Category 3

I created a link "Item Listings - Categories" linked to the main category "Plants.
When I click on "Plants" I get the main category and the sub-categories as you can see in the attached image K2-categories.png.

However I'd like to know if it is possible to show only the sub-categories without the main category.

Thank you in advance
Attachments:

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 4 months ago #82981 by Yiota
You can choose from the Categorys' parameters not to show the Category. You can do that from the Category View options.

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

  • Helio Alves
  • Helio Alves's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #82982 by Helio Alves
Thank you very much Yiota, it worked.

I still get Children Categories, I guess I'll have to go into the code and hack it right? It would be into the component code or into the template code?

Thank you,
Helio

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 4 months ago #82983 by Yiota
I would advise you not to hack any component files, but ideally work on the template overrides of the component. It's in the category.php file the line you want to hack :)

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

More
14 years 4 months ago #82984 by Simon Wells
I love template over rides ;)

Simon
K2 Support

Yiota Ziaggou said:I would advise you not to hack any component files, but ideally work on the template overrides of the component. It's in the category.php file the line you want to hack :)

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

  • Helio Alves
  • Helio Alves's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #82985 by Helio Alves
Sorry I mew to K2, how to do template over rides on K2?

Thank you

K2Joom said:I love template over rides ;)
Simon
K2 Support

Yiota Ziaggou said:I would advise you not to hack any component files, but ideally work on the template overrides of the component. It's in the category.php file the line you want to hack :)

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

  • Yiota
  • Yiota's Avatar
  • Visitor
14 years 4 months ago #82986 by Yiota
Inside your template under folder html create a folder com_k2.
Go to folder components/com_k2/templates and copy all the files under that folder.
Then paste them inside the templates/Your Template/html/com_k2 folder you have created and you are set.
Everything you want to change just edit those files.

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

More
14 years 4 months ago #82987 by Simon Wells
And you will need to change the K2 template from within your category parameters, else it will just look at the default and not the new one you created.

It is also worth changing the name of the folder after you have copied it.
So after you made copy like Yiota said, you will have templates/Your Template/html/com_k2/templates/default.
change that default folder name, but NOT the default folder name found in components/com_k2 ;)

There is some extra information in the K2 documents section at K2Joom.com

Simon
K2 Support

Yiota Ziaggou said:Inside your template under folder html create a folder com_k2. Go to folder components/com_k2/templates and copy all the files under that folder.
Then paste them inside the templates/Your Template/html/com_k2 folder you have created and you are set.
Everything you want to change just edit those files.

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

  • Helio Alves
  • Helio Alves's Avatar Topic Author
  • Offline
  • New Member
More
14 years 4 months ago #82988 by Helio Alves
Thank you very much Yiota and k2Joom, I'll give it a try :)

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


Powered by Kunena Forum