- Posts: 7
COMMUNITY FORUM
K2 Item classes
- Dennis
-
Topic Author
- Offline
- New Member
Less
More
10 years 2 weeks ago #143228
by Dennis
K2 Item classes was created by Dennis
Hey all,
I am trying to give own CSS classes to K2 Items, so that I can style the items individually. I can't see it in the backend, but also don't know in which file i have to look and what I have to code there.
Looking forward on some helpful information.
I am trying to give own CSS classes to K2 Items, so that I can style the items individually. I can't see it in the backend, but also don't know in which file i have to look and what I have to code there.
Looking forward on some helpful information.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 2 weeks ago #143230
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Item classes
There is no option for this in the backend, you need to override the item.php file. This post will help you with locating and overriding the item's file (item.php)
www.joomlaworks.net/blog/item/194-k2-inheritance-sub-templating
www.joomlaworks.net/blog/item/194-k2-inheritance-sub-templating
Please Log in or Create an account to join the conversation.
- Dennis
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 7
10 years 2 weeks ago #143233
by Dennis
Replied by Dennis on topic K2 Item classes
With the help of the tutorial I have made a sub template now, but don't know where I can assign it to the specific item.
I also have created a page class for the menu entry of the page. I can see it when I inspect the element in the browser. I have tried to use the class in the suggested CSS files, but no effect.
Furthermore, when I create a class or a suffix in the backend and inspect it in the browser there is always an additional blank space, e.g. class="itemView _tanz". Why is this?
I also have created a page class for the menu entry of the page. I can see it when I inspect the element in the browser. I have tried to use the class in the suggested CSS files, but no effect.
Furthermore, when I create a class or a suffix in the backend and inspect it in the browser there is always an additional blank space, e.g. class="itemView _tanz". Why is this?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 2 weeks ago #143247
by Krikor Boghossian
Replied by Krikor Boghossian on topic K2 Item classes
Once you create the overrides you can directly generate your class (eG: based on the category or the ID directly on the php file)
Futhermore the page's class should not start with an underscore if you want to use it in K2 items / categories.
Futhermore the page's class should not start with an underscore if you want to use it in K2 items / categories.
Please Log in or Create an account to join the conversation.