- Posts: 142
COMMUNITY FORUM
Where to put css override?
- theant
-
Topic Author
- Offline
- Premium Member
I'm a little confused about where exaclty to put the modified css file to override K2 one.
I tried
templates/my-template/html/com_k2/css/k2.css
and
templates/my-template/html/com_k2/css/k2.css
but it doesn't work.
Please, can you help me?
Please Log in or Create an account to join the conversation.
- Keith Dick
-
- Offline
- Junior Member
- Posts: 25
Then copy the complete default k2 template file including the css file and all the .php files into this 'templates folder so you will now have:
/templates/my-template/html/com_k2/templates/default
Now add copies of the defailt file with all contents into the same folder having renamed it to anything you want:
/templates/my-template/html/com_k2/templates/blog
Now rename the .css file contained within to match the folder name blog_style.css don't forget the _style in the name.
There's a good tutorial here: [url=K2 Override tutorial]getk2.org/documentation/k2class2012/item/865-k2-template-and-overrides[/url]
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
The last movie in the ostraning series under documentation shows how in detail
Please Log in or Create an account to join the conversation.
- theant
-
Topic Author
- Offline
- Premium Member
- Posts: 142
I want simple to modify the main css file, not the view files, because if I upgrade K2 I don't overwrite the modified file.
So, I must copy the
components/com_k2/css/
into
templates/my_template/html/com_k2/css/?
It seems don't affect the look of k2 items
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- theant
-
Topic Author
- Offline
- Premium Member
- Posts: 142
Please, fix the path into your templating tutorial here:
getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates
the right path to use is not
/templates/YOURTEMPLATE/html/com_k2/default/item.php
but
/templates/YOURTEMPLATE/html/com_k2/templates/default/item.php
otherwise it doesn't work (for me)
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
I can't use CSS4K2 because it doesn't work with Joomla 3. But I imagine that functionality should be part of K2 by now anyway.
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
The video also shows that the CSS file is loaded after the K2 one. On my site, even though K2 detects the new template in the backend, it is not loading it or the CSS. Did the CSS files get moved at some point from the templates directory (because they are not there now), and the CSS4K2 has not been updated to reflect this but simply to install on J!3.1?
Please could someone spend a little while giving an up to date (Sept 2013) tutorial in simple to understand steps on how to use the custom override which is one of the best selling points of K2, and which does not seem to work unless you have a degree in "whoknowswhat".
I think it would be a great deal of help to a lot of people, me included.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
The method of overriding has not changed. Since CSS4K2 is a 3rd party extension and is not develop by us and also some frameworks follow a different method, I am not aware of any changes. I suggest that you ask RC if they are using a different overriding method.
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
Does K2 not allow custom CSS in the same was as CSS4K2, and if so how? In other words is it possible to have sub-templates with custom CSS, and if so, where do those CSS files go, because the documentation does not say so, and the CSS files are not in the template folder.
Krikor Boghossian wrote: I suggest that you ask RC if they are using a different overriding method.
RC? Is that rockettheme or the css4k2 developer?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
K2 allows as many stylesheets as you want (Although you should only override k2.css or use your template's stylesheets ), it basically works the same way as com_content.
If your template uses a different method you should contact the template developer.
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
The article by Fotis Evangelou here is nearly 2 years old. I was not using K2 then but it makes no mention of where to put the CSS files, do they go inside the com_k2/templates/YOUROVERRIDE directory, or do they go in the CSS folder inside /YOURJOOMLATEMPLATE/CSS?
One line answers don't really help so please try to explain how its done.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
The original file is located in /media/k2/assets/css . If you are putting this file in your css folder and still not seeing the changes then some extension or framework is not using (and blocking) the default method of overriding.
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
Also the css file has to be called k2.css?
Please Log in or Create an account to join the conversation.
- jonny jackson
-
- Offline
- New Member
- Posts: 17
simply put your css-file in to this folder. I think it has to be named k2.css...
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
Please Log in or Create an account to join the conversation.
- jonny jackson
-
- Offline
- New Member
- Posts: 17
Simply copy the css file k2.css from :
components/com_k2/css/
into
/templates/YOURJOOMLATEMPLATE/css/
and add changes as you wish...
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
Please Log in or Create an account to join the conversation.
- Joe Collins
-
- Offline
- New Member
- Posts: 13
K2 allows me to pick the template from category manager, but it is still loading only the default k2.css file from the components/com_k2 folder.
Also tried with CSS4K2 disabled and enabled, same results. K2 is not loading the CSS file from JOOMLATEMPLATE/html/com_k2/css.
Is there a setting in K2 that turns off the use off sub-templates and maybe that is not enabled? I did look but it might be there.
Please Log in or Create an account to join the conversation.