Issue #165 - allow to set configuration of children to their parents config, but on their own names.
Global options (navigation) are even carried through so that they use the central part. This falls back in place rather nicely, I hope it REALLY works. My first tests showed no issues.
This commit is contained in:
@ -260,6 +260,22 @@ function serendipity_fetchTemplateInfo($theme, $abspath = null) {
|
||||
|
||||
if (@is_file($serendipity['templatePath'] . $theme . '/config.inc.php')) {
|
||||
$data['custom_config'] = YES;
|
||||
$data['custom_config_engine'] = $theme;
|
||||
}
|
||||
|
||||
// Templates can depend on a possible "Engine" (i.e. "Engine: 2k11").
|
||||
// We support the fallback chain also of a template's configuration, so let's check each engine for a config file.
|
||||
if (!empty($data['engine'])) {
|
||||
$engines = explode(',', $data['engine']);
|
||||
foreach($engines AS $engine) {
|
||||
$engine = trim($engine);
|
||||
if (empty($engine)) continue;
|
||||
|
||||
if (@is_file($serendipity['templatePath'] . $engine . '/config.inc.php')) {
|
||||
$data['custom_config'] = YES;
|
||||
$data['custom_config_engine'] = $engine;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $theme != 'default' && $theme != 'default-rtl'
|
||||
|
Reference in New Issue
Block a user