Cotonti / Open Source PHP Content Management FrameworkContent Management Framework

Форуми / Cotonti / Skins / Colour Schemes

More information on colour schemes for themes

#1 06.08.2012 01:58

Themes can have different colour schemes, but how exactly does this work?

I did a search on the website here but didn't find much information on the subject.

Can someone point me in the right direction or answer the question here?


Oh btw - since skins are called themes nowadays with Siena, maybe it's better to change the forum category name. :)

#2 06.08.2012 02:54

create category, then go to / modules / pages / tpl

example: page.list.tpl

create games category:

personalize your .tpl


another option --> change themes

to the topic name in the configuration, up to three


I hope that helps


#3 06.08.2012 03:06

Thanks for the reply, but it's actually not what i'm looking for.

The first bit you explained is for customizing a TPL for different pages or categories, and the second is a plugin to specify a theme for a specific device.

I'm wondering how exactly different colour schemes can be used on themes.
Cotonti has a config option for it, but how can it be used?

#4 06.08.2012 04:55

Given that you have 3 files in themes/your_theme/css folder: default.css, light.css and dark.css, you can use them as color schemes:


So you use CSS file names as keys and give them some titles, all comma separated.

May the Source be with you!
#5 06.08.2012 07:06

^^ Call me a noob, but I am a person that uses multiple css files (coz I truly do not like large css files. like to keep it organized..)

Usually I end up with a smal list:

  • default
  • index
  • pages
  • header
  • footer
  • forums and
  • users

You probably are going to tell me that a) having 1 less css files makes shit react faster, and b) whatever resaon.. :)

will this work with how I like to work?

#6 06.08.2012 17:44

That's pretty fine, you can use a structure like that plus create a few stylesheets which override some colors, so you can add 'light.css' and 'dark.css' to that family and define some colors/backgrounds there (with !important override if necessary). Also don't forget about @import statement.

May the Source be with you!
#7 27.03.2013 10:58

Hi Trustmaster,

I cannot seem to get this to work. I've created, say, green.css, blue.css and placed alongside default.css in /themes/MY_SKIN/css/. I've also added those css files to MY_SKIN.php:

/* ====================
==================== */

defined('COT_CODE') or die('Wrong URL');


Upon selecting it in my profile no change occurs. 'blue.css' does not appear in the header in the source. Is there a magical tag missing somewhere to get this included?

The MY_SKIN.rc.php file seems to have 'default.css' hard-coded. Should there be a line such as:



#8 27.03.2013 14:33

Most likely you will need loading 2 CSS files at a time. Move all your common CSS rules to a file called e.g. css/base.css and connect it via MY_SKIN.rc.php:


Then put all colour-specific styles to appropriate files like css/blue.css, css/green.css, etc. and connect them the old way in header.tpl:

<link rel="stylesheet" type="text/css" href="{PHP.cfg.themes_dir}/{PHP.theme}/css/{PHP.scheme}.css">

There's a more tricky way using cot_rc_link_file() in MY_SKIN.php, but the above should just work.

May the Source be with you!
#9 27.03.2013 15:29

Works a treat.

Is there nothing this man cannot solve?! :)