- Posts: 36
COMMUNITY FORUM
Custom Style Sheet
- Ewoud Vreugdenhil
- Topic Author
- Offline
- Junior Member
Less
More
12 years 5 days ago #104163
by Ewoud Vreugdenhil
Custom Style Sheet was created by Ewoud Vreugdenhil
Hi there,
On one of my website I have made a couple of changes in the category_item.php, item.php and k2.css files. With every update I need to redo these changes again.
Is there a way to avoid this? I know I can duplicate the template but then this doesn't have the necassary updates. Is it for example possible to create a custom style sheet with only the necassary changes which is being loaded last? Rockettheme does something similar. Check this page to see what I mean.
Thanks,
ewoud
On one of my website I have made a couple of changes in the category_item.php, item.php and k2.css files. With every update I need to redo these changes again.
Is there a way to avoid this? I know I can duplicate the template but then this doesn't have the necassary updates. Is it for example possible to create a custom style sheet with only the necassary changes which is being loaded last? Rockettheme does something similar. Check this page to see what I mean.
Thanks,
ewoud
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 5 days ago #104164
by william white
Replied by william white on topic Re: Custom Style Sheet
If you are using K2 templating, check out css4k2, which allows you to place a k2.css file in each override directory.
Please Log in or Create an account to join the conversation.
- Ewoud Vreugdenhil
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
12 years 5 days ago #104165
by Ewoud Vreugdenhil
Replied by Ewoud Vreugdenhil on topic Re: Custom Style Sheet
Thanks for your reply.
At the moment I am not using templating. I must be honest that I have not tested it much yet but from what I read, I still have a problem when a new version of K2 is released. If K2 updates the templates folder, you need to start over again and make sure that you copy that folder to /templates/YOURJOOMLATEMPLATE/html/com_k2/ again and do the necassary changes. Is this correct?
I am just looking for a simple way to make changes which will still be there when an update of K2 is released.
At the moment I am not using templating. I must be honest that I have not tested it much yet but from what I read, I still have a problem when a new version of K2 is released. If K2 updates the templates folder, you need to start over again and make sure that you copy that folder to /templates/YOURJOOMLATEMPLATE/html/com_k2/ again and do the necassary changes. Is this correct?
I am just looking for a simple way to make changes which will still be there when an update of K2 is released.
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 5 days ago #104166
by william white
Replied by william white on topic Re: Custom Style Sheet
Then try looking at the ostraning movie under documentation, the last movie shows how to place a blank k2.css and override only the k2 styles you want to override. It will survive most updates, no changes to your default k2 template and should be eaisy to find if newer k2.css changes a bit
Please Log in or Create an account to join the conversation.
- Ewoud Vreugdenhil
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 36
12 years 5 days ago #104167
by Ewoud Vreugdenhil
Replied by Ewoud Vreugdenhil on topic Re: Custom Style Sheet
Thanks for pointing me to that video. In that video they discuss template override by copying the whole template and all it's files and then do the necassary changes. But if I understand you correctly it is possible to only create a custom css file and not copy all the other files.
But still, I have also made changes to php files so I guess I still need to copy those files as well. But then I have to copy them again with updates do the necassary changes again.
I think it is a choice I need to make and see which choice gives me the least work.
Thanks for info, it gives me a better understanding of K2 and overrides.
But still, I have also made changes to php files so I guess I still need to copy those files as well. But then I have to copy them again with updates do the necassary changes again.
I think it is a choice I need to make and see which choice gives me the least work.
Thanks for info, it gives me a better understanding of K2 and overrides.
Please Log in or Create an account to join the conversation.
- JdKock
- Offline
- New Member
Less
More
- Posts: 9
12 years 2 days ago #104168
by JdKock
This works great for the category list. So now i can put a css file in my override directory and put only the css code i wanna change.
But how can i override the K2.css for the archive and tag list view ?
Replied by JdKock on topic Re: Custom Style Sheet
William White wrote: If you are using K2 templating, check out css4k2, which allows you to place a k2.css file in each override directory.
This works great for the category list. So now i can put a css file in my override directory and put only the css code i wanna change.
But how can i override the K2.css for the archive and tag list view ?
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 2 days ago #104169
by william white
Replied by william white on topic Re: Custom Style Sheet
I havent tried that, i would firebug views to se what css tags they use and try adding them to your css override file
Please Log in or Create an account to join the conversation.