Keyword

Multiple CSS options

More
14 years 2 months ago #85930 by yerg
Multiple CSS options was created by yerg
Not sure if I can do this but here goesI am am setting up a magazine with 6 sections and I'd like each section to have it's own colour.The only example I can think of is here at Joomlart where each of the menus applies a different CSS for colour change, nothing more.Been crashing round trying to get something similar working but not getting anywhere fastIs it possible with K2?If so has anyone got it working?I'm stuck so if the above are yes can you point me in the right direction please?

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

More
14 years 2 months ago #85931 by Josh
Replied by Josh on topic Multiple CSS options
i too would like to find out how to edit each subtemplates css styles.. not sure if I need to use a suffix on the default css rules or what. any advice would be appreciated

cheers

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

  • Francisco Caivano Zori
  • Francisco Caivano Zori's Avatar
  • Offline
  • Junior Member
More
14 years 2 months ago #85932 by Francisco Caivano Zori
Replied by Francisco Caivano Zori on topic Multiple CSS options
Im tryng to do the same thing.

I have a website that has 3 sections that have to look different (not just on color, also on the element's order inside the item.php file)

I know i can:
components/com_k2/templates/default/
Copy it to >
components/com_k2/templates/secondtemplate/
components/com_k2/templates/thirdtemplate/
components/com_k2/templates/fourthtemplate/

And i also can: (does the component recognize templates -while editing a category- if they are placed like this)
templates/MYTEMPLATENAME/html/com_k2/templates/secondtemplate/
templates/MYTEMPLATENAME/html/com_k2/templates/thirdtemplate/
templates/MYTEMPLATENAME/html/com_k2/templates/fourthtemplate/

But where should i put CSS (k2.css) file if i need a custom one for each file?.


Bye ;)

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

More
14 years 2 months ago #85933 by yerg
Replied by yerg on topic Multiple CSS options
@Francisco thanks for that
I was taking a different track and got lost
Will see what transpires with what you have provided

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

More
14 years 2 months ago #85934 by william white
Replied by william white on topic Multiple CSS options
Take a look here: simon.getk2.org/downloads/free-extensions/item/26-css-4-k2

Francisco Caivano said:Im tryng to do the same thing.
I have a website that has 3 sections that have to look different (not just on color, also on the element's order inside the item.php file)

I know i can:
components/com_k2/templates/default/
Copy it to >
components/com_k2/templates/secondtemplate/
components/com_k2/templates/thirdtemplate/
components/com_k2/templates/fourthtemplate/

And i also can: (does the component recognize templates -while editing a category- if they are placed like this)
templates/MYTEMPLATENAME/html/com_k2/templates/secondtemplate/
templates/MYTEMPLATENAME/html/com_k2/templates/thirdtemplate/
templates/MYTEMPLATENAME/html/com_k2/templates/fourthtemplate/

But where should i put CSS (k2.css) file if i need a custom one for each file?.


Bye ;)

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

  • Francisco Caivano Zori
  • Francisco Caivano Zori's Avatar
  • Offline
  • Junior Member
More
14 years 2 months ago #85935 by Francisco Caivano Zori
Replied by Francisco Caivano Zori on topic Multiple CSS options
@William White

thanks a lot. But i think this should be a core function.. something that already k2 could handle.

Bye ;)

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

More
14 years 2 months ago #85936 by Simon Wells
Replied by Simon Wells on topic Multiple CSS options
Hi Francico,

It is possible to use use different K2 templates with different colours or even style which are assigned to menu items.
It is even possible to assign different joomla templates to the menu item, with each joomla template having its own set of k2 templates.
mkcworthing.org shows an example of two joomla templates being used, one for centre, one for club.
Both will have their own sets of k2 templates, but this is still in development.

It is strongly advised to keep the k2 template over rides within the joomla template and not the k2 component, because when you upgrade k2, you will loose your templates.

Full instructions are contained within the link that William provided.

Also, there is the cc4k2 plugin which will allow each k2 template to have its own css file thus allowing an infinite control over each template style.
This is the option that you should be using, the css file would then sit within the same folder as your item.php, category.php etc, but again, should be moved to your Joomla template.

Hope that helps, but feel free to post back further questions.

Simon
K2 Support

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


Powered by Kunena Forum