SOLUTION 1 - dinamyc id for the body tag for every category and all the pages in it
cat=1 and all the albums and pages in it will have id page1, cat=2 and all the albums and pages in it will have id page2.
With firefox inspect element,firebug or view page source is possible to see the body id <body id="page1"> after using the code.
Then you can add specific rules in the .css file of your theme like this:
body#page1{background:red;}
body#page2{background:black;}
body#page1 #main_menu{color:red;font-family:Verdana,sans-serif;}
REPLACE custom text in the code like themes/your_theme_nam... with the right path.
Step 1
Open themes/your_theme_name/theme.php and add this code to function pageheader before $template_vars = CPGPluginAPI::filter('theme_pageheader_params', $template_vars); (copy the function pageheader from themes/sample/theme.php if is not in your theme.php) :
CODE edited 15/12/2016. The old code was wrong.
// css mod - start
global $cat;
$superCage = Inspekt::makeSuperCage();
if ($superCage->get->getRaw('file') == 'minicms/cms') {
$current_id = $superCage->get->getInt('id');
} elseif (!$cat) {
$current_id = 0;
} elseif ($cat < 0) {
$aid = -$cat;
$current_id = mysql_result(cpg_db_query("SELECT category FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid = '$aid' LIMIT 1"), 0);
} else {
$current_id = $cat;
}
$bodyid = $current_id;
$template_vars['{BODYID}'] = $bodyid;
// css mod - end
Step 2
Open themes/your_theme_name/template.html
FIND
<body>
REPLACE WITH
<body id="page{BODYID}">
SOLUTION 2 - dinamyc id for the body tag for every category and every album
cat=1 will have body id pagecat_1 and album=1 with all the pages in it will have id pagealb_1, cat=2 will have body id pagecat_2 and album=2 with all the pages in it will have id pagealb_2 etc
Just replace the code from step 1 of solution 2 with this code:
// css mod - start
global $cat, $CPG_PHP_SELF;
if ($cat < 0) {
$what = 'alb_';
$current_id = -$cat;
} else {
$what = 'cat_';
$current_id = $cat;
}
$bodyid = $what.$current_id;
$template_vars['{BODYID}'] = $bodyid;
// css mod - end