Keyword

Templating with K2, css problem

  • Dimitris Kanellopoulos
  • Dimitris Kanellopoulos's Avatar Topic Author
  • Offline
  • New Member
More
11 years 11 months ago #104846 by Dimitris Kanellopoulos
Templating with K2, css problem was created by Dimitris Kanellopoulos
Hi K2 Team!

Our Joomla/k2 installation has 3 different sections, "Νews", "Βlog" & "Products".

We did excacty what the documention on "Templating with K2 and the concepts of sub-templates"

We already applied .css for "Products" section.
We copied K2.ccs from "component" directory to "our template" directory (css folder)

We noticed tha K2.ccs file affects all sections/templates we created.
Since we want different layout for every section, in which way can we achieve that by applying css?

In the documention we read "...as you want need to have different layouts for the registration page or the user page or the page that shows search results from K2 content! If you want to override K2, just go ahead and edit these "views".

By "edit" it means "appling ccs rules" or by "modifing the .php files of subtemplates" (copies of default).

We know how to work with css but our knowledge on .php is "O"

Is there a way to style each section with applying different css for each one of them?

Thank in advance for your help

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

More
11 years 11 months ago #104847 by william white
Replied by william white on topic Re: Templating with K2, css problem
If you have created several k2 templates or overrides, then you should use css4k2 from jiliko.net avaliable for download at k2joom.com, after installeing the plugin, place a copy of k2.css into each override directory and renamen it YourOverrideName_style.css

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

  • Dimitris Kanellopoulos
  • Dimitris Kanellopoulos's Avatar Topic Author
  • Offline
  • New Member
More
11 years 11 months ago #104848 by Dimitris Kanellopoulos
Replied by Dimitris Kanellopoulos on topic Re: Templating with K2, css problem
We know about ccs4k2, we already downloaded but we have not installed yet.
The reason is because we did get yet where to place the the copy of K2.css which we ll rename it to "YourOverrideName_style.css"

At the moment we created 2 copies of "default" folder in "templates/our template/html/com_k2/ folder,
which are k2_blog, k2_news

Are these 2 the folders that we should place the "YourOverrideName_style.css"

If it so (hopefully) does the name of the new _style.ccs file is related to the name of the folder?
i.e. if the name of the folder is "K2_blog"
does the name of the renamed files has to be "K2_blog_style.css"

Also, do we keep the k2.css file which we copied from components/com_k2/css folder to in the templates/our template/css folder?

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

More
11 years 11 months ago #104849 by william white
Replied by william white on topic Re: Templating with K2, css problem
Putting it in the templates folder usually will override the entire site.
There is a detailed movie on this under documentation - ostraining videos near the bottom.
If you have
root/templates/YourTemplate/html/com_k2/templates/k2_blog folder with your edited files in it
place k2.css into that folder, or an empty file and name it k2_blog_style.css and it will style that category only when the override is selected
Im not sure how the k2.css in the templates css file will work but you can just rename it and test, i think they will work together

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

  • Dimitris Kanellopoulos
  • Dimitris Kanellopoulos's Avatar Topic Author
  • Offline
  • New Member
More
11 years 11 months ago #104850 by Dimitris Kanellopoulos
Replied by Dimitris Kanellopoulos on topic Re: Templating with K2, css problem
We let you know on the final result after we finished it!

Thank U William!

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


Powered by Kunena Forum