Keyword

Where to put css override?

  • theant
  • theant's Avatar Topic Author
  • Offline
  • Premium Member
More
12 years 1 month ago #102709 by theant
Where to put css override? was created by theant
Hello
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.

More
12 years 1 month ago #102710 by Keith Dick
Replied by Keith Dick on topic Re: Where to put css override?
/templates/my-template/html/com_k2/templates

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.

More
12 years 1 month ago #102711 by william white
Replied by william white on topic Re: Where to put css override?
I like to use css4k2 avaliable at k2joom.com
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
  • theant's Avatar Topic Author
  • Offline
  • Premium Member
More
12 years 1 month ago #102712 by theant
Replied by theant on topic Re: Where to put css override?
Thank you Twoten
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.

More
12 years 1 month ago #102713 by Lefteris
Replied by Lefteris on topic Re: Where to put css override?
In order to override the component CSS you need to create the file /templates/YOUR_TEMPLATE/css/k2.css.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • theant
  • theant's Avatar Topic Author
  • Offline
  • Premium Member
More
12 years 3 weeks ago #102714 by theant
Replied by theant on topic Re: Where to put css override?
Thank you Lefteris.

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.

More
11 years 4 weeks ago - 11 years 4 weeks ago #102715 by Joe Collins
Replied by Joe Collins on topic Re: Where to put css override?
Sorry to revive an old thread, but I would like to have a CSS over ride, I know how to set it up so K2 picks up the template (putting a copy of the default template in /JOOMLATEMPLATE/html/com_k2 and renaming it blog for example) but where do the CSS over rides for those alternative templates go?

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.

This message contains confidential information

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

More
11 years 4 weeks ago - 11 years 4 weeks ago #102716 by Joe Collins
Replied by Joe Collins on topic Re: Where to put css override?
I have read a lot of the same problems on this website, and all the answers differ from the video. In the video, the lady does not have to copy the entire k2.css file into the template override directory, she just makes a simple .css file with the changes she wants and it works out of the box. So either the video is wrong or outdated.

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 4 weeks ago #102717 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Where to put css override?
Hello Joe,

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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

More
11 years 4 weeks ago #102718 by Joe Collins
Replied by Joe Collins on topic Re: Where to put css override?
Thanks for replying,

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.


Powered by Kunena Forum