01142: $PageCSSListFmt does not get defaults if config.php already set any values
$PageCSSListFmt
does not get defaults if config.php already set any valuesDescription: In scripts/skins.php we have
SDV($PageCSSListFmt,array( 'pub/css/local.css' => '$PubDirUrl/css/local.css', 'pub/css/{$Group}.css' => '$PubDirUrl/css/{$Group}.css', 'pub/css/{$FullName}.css' => '$PubDirUrl/css/{$FullName}.css'));
This executes after local/config.php. Some recipes set their own keys inside
to get their CSS into the header; but because they ran first, the SDV will do nothing, and these defaults are lost. (action=diag confirms this.)
$PageCSSListFmt
Changing it to SDVA() in skins.php is one solution but that disallows customisation of $PageCSSListFmt
to remove these defaults. Another option is to re-add them in local/config.php.
This is not a bug, SDV() is used instead of SDVA() precisely in order to allow the removal, and yes, an admin has to redefine the whole array in config.php. --Petko
Is it wrong for a recipe to do this? Is there a better way to inject CSS file links?
The recipe could add the <link rel='stylesheet' type="text/css"> markup directly in a $HTMLHeaderFmt
['recipename1'] variable. --Petko September 20, 2009, at 02:39 AM