1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 06:07:31 +02:00

fix error if theme settings are missing

This commit is contained in:
trendschau
2024-11-12 16:01:15 +01:00
parent a8e85cf28d
commit d593f58678

View File

@@ -86,21 +86,24 @@ class Extension
{
$themeSettings = $this->storage->getYaml('themesFolder', $themeName, $themeName . '.yaml');
# add standard-textarea for custom css
$themeSettings['forms']['fields']['fieldsetcss'] = [
'type' => 'fieldset',
'legend' => Translations::translate('Custom CSS'),
'fields' => [
'customcss' => [
'type' => 'codearea',
'label' => Translations::translate('Add your individual CSS'),
'class' => 'codearea',
'description' => Translations::translate('You can overwrite the theme-css with your own css here.')
if($themeSettings)
{
# add standard-textarea for custom css
$themeSettings['forms']['fields']['fieldsetcss'] = [
'type' => 'fieldset',
'legend' => Translations::translate('Custom CSS'),
'fields' => [
'customcss' => [
'type' => 'codearea',
'label' => Translations::translate('Add your individual CSS'),
'class' => 'codearea',
'description' => Translations::translate('You can overwrite the theme-css with your own css here.')
]
]
]
];
];
$themeSettings['preview'] = '/themes/' . $themeName . '/' . $themeName . '.png';
$themeSettings['preview'] = '/themes/' . $themeName . '/' . $themeName . '.png';
}
return $themeSettings;
}