- Posts: 9
COMMUNITY FORUM
Templating and css4k2
- Mister Andreas
- Topic Author
- Offline
- New Member
Less
More
14 years 4 months ago #84922
by Mister Andreas
Templating and css4k2 was created by Mister Andreas
HiI have digged into templating for K2 and the usage of css42k. However, there are some things that I don't completely understand. Lets say I wan't to make a template for all my news-articles and I wan't to have different .css styles for the different templates. I installed the css4k2 component, but I don't have any parameters to configure it?Is this correct? Because it manages to get the differect overrided k2.css styles in each template. I had to delete the k2.css from the com_k2/css/ folder as-well so the new templates would'nt inherit the css-styles. E.g. when I made a custom template for my newspages and made a configuration in that .css I had to eiter(let's say it is the background I wan't to change)Write background: none; and if I tried to delete the background attribute it inherited the background attributed from the k2.cssI just wanna know if this is the correct behavior.Thanks in advance!
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 4 months ago #84923
by william white
Replied by william white on topic Templating and css4k2
You should not have to delete k2.css from the core. Each subtemplate should have its own style.css
Use firebug to see what is overriding what.
Is your css filename correct in the subtemplate directory?
simon.getk2.org/downloads/free-extensions/item/26-css-4-k2
Use firebug to see what is overriding what.
Is your css filename correct in the subtemplate directory?
simon.getk2.org/downloads/free-extensions/item/26-css-4-k2
Please Log in or Create an account to join the conversation.
- Mister Andreas
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
14 years 4 months ago #84924
by Mister Andreas
Replied by Mister Andreas on topic Templating and css4k2
Hi william
This is the path
/public_html/templates/ades/html/com_k2/templates
inside the templates catalog I have two templates one named default and one named mainsites. Inside the mainsites catalog I have a .css file named mainsites_style.css.
And is it right that the css4k2 don't have any settings inside of joomla? because I have'nt been able to find that.
This is the path
/public_html/templates/ades/html/com_k2/templates
inside the templates catalog I have two templates one named default and one named mainsites. Inside the mainsites catalog I have a .css file named mainsites_style.css.
And is it right that the css4k2 don't have any settings inside of joomla? because I have'nt been able to find that.
Please Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 4 months ago #84925
by william white
Replied by william white on topic Templating and css4k2
Your path looks correct.
My path is usually htdocs/templates.... or httpdocs/templates.....
but
your system may be different.
Change the mainstites_style.css and look for the changes in the browzer. The should be there.
My path is usually htdocs/templates.... or httpdocs/templates.....
but
your system may be different.
Change the mainstites_style.css and look for the changes in the browzer. The should be there.
Please Log in or Create an account to join the conversation.
- Mister Andreas
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
14 years 4 months ago #84926
by Mister Andreas
Replied by Mister Andreas on topic Templating and css4k2
I got it working a few hours ago, thanks for taking the time. Have a nice day/night!
Please Log in or Create an account to join the conversation.
- irish
- Offline
- Senior Member
Less
More
- Posts: 53
14 years 2 months ago #84927
by irish
Replied by irish on topic Templating and css4k2
Hi Mister Andreas,
What did you do to get it to work? I am using the same file paths and when a sub-template is selected in categories I loose all css for k2. I do have the sub templates set to inherit settings.
I have the settings as follows:
Keep k2 css (no)
Force original category theme (yes)
Force default Theme (yes)
Allow multi Css (no)
I might add that I am using a RocketTheme template and joomla 1.5.20 with k2v2.3.
Mister Andreas said:I got it working a few hours ago, thanks for taking the time. Have a nice day/night!
What did you do to get it to work? I am using the same file paths and when a sub-template is selected in categories I loose all css for k2. I do have the sub templates set to inherit settings.
I have the settings as follows:
Keep k2 css (no)
Force original category theme (yes)
Force default Theme (yes)
Allow multi Css (no)
I might add that I am using a RocketTheme template and joomla 1.5.20 with k2v2.3.
Mister Andreas said:I got it working a few hours ago, thanks for taking the time. Have a nice day/night!
Please Log in or Create an account to join the conversation.
- irish
- Offline
- Senior Member
Less
More
- Posts: 53
14 years 2 months ago #84928
by irish
Replied by irish on topic Templating and css4k2
OK OK ! I got it to work...
When renaming the k2.css I changed the name to mytemplatename_style.css - when changing the name of the css file that is already saved as a .css file do not add the file extension .css when you rename the file. The file name will end up as mytemplatename_style.css.css if you do. So remember to rename k2 to mytemplate_style. Of course if your OS system is set to show the file extension in the file name then you don't have to worry.
Note to self: check file names before asking stupid questions
When renaming the k2.css I changed the name to mytemplatename_style.css - when changing the name of the css file that is already saved as a .css file do not add the file extension .css when you rename the file. The file name will end up as mytemplatename_style.css.css if you do. So remember to rename k2 to mytemplate_style. Of course if your OS system is set to show the file extension in the file name then you don't have to worry.
Note to self: check file names before asking stupid questions
Please Log in or Create an account to join the conversation.