- Posts: 11
COMMUNITY FORUM
Template Override
- Michael Brown
- Topic Author
- Offline
- New Member
Less
More
8 years 10 months ago #149208
by Michael Brown
Replied by Michael Brown on topic Template Override
Sweet. I was able to accomplish that with your guidance, however it only applies when you enter into that specific category.
I need this to work not in the category_item.php but rather in the category.php file.
When I copy the working code from category_item.php to category.php it does not exectute. Any thoughts on how to apply a css style to a specific category while in the k2 category layout view?
All I'm attempting to do is on the k2 category layout, have a grid of 4 columns, one of the items will have a different css style - regardless of k2 category assignment.
I need this to work not in the category_item.php but rather in the category.php file.
When I copy the working code from category_item.php to category.php it does not exectute. Any thoughts on how to apply a css style to a specific category while in the k2 category layout view?
All I'm attempting to do is on the k2 category layout, have a grid of 4 columns, one of the items will have a different css style - regardless of k2 category assignment.
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
8 years 10 months ago #149218
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Template Override
It's the same logic. Just add the extra class to the category div container instead of the item container. Then target it with CSS.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Erwin Hunter
- Offline
- New Member
Less
More
- Posts: 2
8 years 9 months ago #150194
by Erwin Hunter
Replied by Erwin Hunter on topic Template Override
Michael,
Can you please share what you did to get the overrides to work? I have been combing the internet and can not find a solution. I followed JoomlaWorks instruction to a T. Everything you mentioned in the beginning of your post is exactly what I am experiencing. Only the default folder is getting picked up. I copied that folder to a folder called photogallery. Changed the template in both the K2 Categories area and on the Menu. I have placed additional instructions in the itemform.php file for the Photo Gallery. But now I want to create a Blogs area with K2 and the same instructions does not apply to blogs. I haven't even gotten to the CSS yet, but the last post sounds like it will work fine with using custom css classes.
My problem is getting K2 to pickup my override folder...other than default. Please help!
Erwin
Can you please share what you did to get the overrides to work? I have been combing the internet and can not find a solution. I followed JoomlaWorks instruction to a T. Everything you mentioned in the beginning of your post is exactly what I am experiencing. Only the default folder is getting picked up. I copied that folder to a folder called photogallery. Changed the template in both the K2 Categories area and on the Menu. I have placed additional instructions in the itemform.php file for the Photo Gallery. But now I want to create a Blogs area with K2 and the same instructions does not apply to blogs. I haven't even gotten to the CSS yet, but the last post sounds like it will work fine with using custom css classes.
My problem is getting K2 to pickup my override folder...other than default. Please help!
Erwin
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 9 months ago #150196
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Template Override
Hello Erwin,
Please read this post: www.joomlaworks.net/blog/item/194-k2-inheritance-sub-templating
If you are using a multi category menu, then the option is also located in the menu item's settings.
If you did everything correctly, some frameworks and 3rd party extensions are known to cause this issue.
Please read this post: www.joomlaworks.net/blog/item/194-k2-inheritance-sub-templating
If you are using a multi category menu, then the option is also located in the menu item's settings.
If you did everything correctly, some frameworks and 3rd party extensions are known to cause this issue.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Erwin Hunter
- Offline
- New Member
Less
More
- Posts: 2
8 years 9 months ago - 8 years 9 months ago #150220
by Erwin Hunter
Replied by Erwin Hunter on topic Template Override
Thank you Krikor.www.joomlaworks.net/forum/k2-en/44128-template-override/reply#
I thought about your comment about 3rd party extensions and started to uninstall one extension at a time until it started working. But then seen another menu item for K2 called Latest Items. I chose that for my Menu item and narrowed it down to a single category and what do you know!! It pulled in the override!! So, that leads me to believe that it's not a problem of a 3rd party extension. It will pull in overrides if you choose Latest Items, but will not pull in overrides if you just chooses Categories. See Image. (Well, I had an image but don't want to go through the trouble of using imgur.com)
Any ideas why this would be the case?
I thought about your comment about 3rd party extensions and started to uninstall one extension at a time until it started working. But then seen another menu item for K2 called Latest Items. I chose that for my Menu item and narrowed it down to a single category and what do you know!! It pulled in the override!! So, that leads me to believe that it's not a problem of a 3rd party extension. It will pull in overrides if you choose Latest Items, but will not pull in overrides if you just chooses Categories. See Image. (Well, I had an image but don't want to go through the trouble of using imgur.com)
Any ideas why this would be the case?
Last edit: 8 years 9 months ago by Erwin Hunter. Reason: grammar
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
8 years 9 months ago #150223
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Template Override
Make sure that you followed the screenshots in the post I gave you.
They describe how to setup your categories.
They describe how to setup your categories.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.