I've taken the liberty of recoding the portion of the CSS-loading section of /includes/templates/template_default/common/html_header.php to adhere to the CSS_read_me.txt file updates that Glenn provided in his referenced suggestion. A more-specific c_xx_yy.css file is loaded after a c_xx_yy_children.css file and a p_xxx.css file is loaded after that ...
Code:
/**
* load stylesheets on a per-page/per-language/per-product/per-manufacturer/per-category basis. Concept by Juxi Zoza.
*/
$manufacturers_id = (isset($_GET['manufacturers_id'])) ? $_GET['manufacturers_id'] : '';
$tmp_products_id = (isset($_GET['products_id'])) ? (int)$_GET['products_id'] : '';
$tmp_pagename = ($this_is_home_page) ? 'index_home' : $current_page_base;
if ($current_page_base == 'page' && isset($ezpage_id)) $tmp_pagename = $current_page_base . (int)$ezpage_id;
$sheets_array = array('/' . $_SESSION['language'] . '_stylesheet',
'/' . $tmp_pagename,
'/' . $_SESSION['language'] . '_' . $tmp_pagename
);
$tmp_cats = explode('_', $cPath);
$value = '';
foreach($tmp_cats as $val) {
$value .= $val;
$sheets_array[] = '/c_' . $value . '_children';
$sheets_array[] = '/' . $_SESSION['language'] . '_c_' . $value . '_children';
$value .= '_';
}
$sheets_array2 = array('/c_' . $cPath,
'/' . $_SESSION['language'] . '_c_' . $cPath,
'/m_' . $manufacturers_id,
'/' . $_SESSION['language'] . '_m_' . (int)$manufacturers_id,
'/p_' . $tmp_products_id,
'/' . $_SESSION['language'] . '_p_' . $tmp_products_id
);
$sheets_array = array_merge($sheets_array, $sheets_array2);
while(list ($key, $value) = each($sheets_array)) {
//echo "<!--looking for: $value-->\n";
$perpagefile = $template->get_template_dir('.css', DIR_WS_TEMPLATE, $current_page_base, 'css') . $value . '.css';
if (file_exists($perpagefile)) echo '<link rel="stylesheet" type="text/css" href="' . $perpagefile .'" />'."\n";
}