- Posts: 6
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- How to display subcategories without showing main Category
How to display subcategories without showing main Category
- Helio Alves
- Topic Author
- Offline
- New Member
Less
More
14 years 6 months ago #82980
by Helio Alves
How to display subcategories without showing main Category was created 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
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
Please Log in or Create an account to join the conversation.
- Yiota
- Visitor
14 years 6 months ago #82981
by Yiota
Replied by Yiota on topic How to display subcategories without showing main Category
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
14 years 6 months ago #82982
by Helio Alves
Replied by Helio Alves on topic How to display subcategories without showing main Category
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
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
- Visitor
14 years 6 months ago #82983
by Yiota
Replied by Yiota on topic How to display subcategories without showing main Category
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.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 6 months ago #82984
by Simon Wells
Replied by Simon Wells on topic How to display subcategories without showing main Category
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 :)
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
14 years 6 months ago #82985
by Helio Alves
Replied by Helio Alves on topic How to display subcategories without showing main Category
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 :)
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
- Visitor
14 years 6 months ago #82986
by Yiota
Replied by Yiota on topic How to display subcategories without showing main Category
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.
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.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 6 months ago #82987
by Simon Wells
Replied by Simon Wells on topic How to display subcategories without showing main Category
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.
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 6
14 years 6 months ago #82988
by Helio Alves
Replied by Helio Alves on topic How to display subcategories without showing main Category
Thank you very much Yiota and k2Joom, I'll give it a try :)
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- How to display subcategories without showing main Category