diff --git a/themes/Cajon_Scss/assets/php/theme.php b/themes/Cajon_Scss/assets/php/theme.php index a365db3..60b752b 100644 --- a/themes/Cajon_Scss/assets/php/theme.php +++ b/themes/Cajon_Scss/assets/php/theme.php @@ -13,10 +13,10 @@ class ThemeCajon{ // enable FontAwesome everywhere \gp\tool::LoadComponents('fontawesome'); - // Cajon Parallax + // Cajon Parallax - js now in settings.php $page->css_user[] = $addonRelativeCode . '/addons/CajonParallax/CajonParallax.css'; - $page->head_js[] = $addonRelativeCode . '/addons/CajonParallax/CajonParallax.js'; - $page->head_js[] = $addonRelativeCode . '/addons/CajonParallax/jquery.scrollspeed/jQuery.scrollSpeed.js'; + //$page->head_js[] = $addonRelativeCode . '/addons/CajonParallax/CajonParallax.js'; + //$page->head_js[] = $addonRelativeCode . '/addons/CajonParallax/jquery.scrollspeed/jQuery.scrollSpeed.js'; } diff --git a/themes/Cajon_Scss/assets/theme_settings/settings.php b/themes/Cajon_Scss/assets/theme_settings/settings.php index ae79809..2613d8c 100644 --- a/themes/Cajon_Scss/assets/theme_settings/settings.php +++ b/themes/Cajon_Scss/assets/theme_settings/settings.php @@ -71,8 +71,8 @@ class ThemeCajon_Settings{ $layout = isset($page->TitleInfo['gpLayout']) ? $page->TitleInfo['gpLayout'] : 'default'; $layout = isset($page->gpLayout) ? $page->gpLayout : $layout; $default_layout = $config['gpLayout']; - $gplayoutsvar1 = $gpLayouts[$default_layout]['name']; - $gplayoutsvar2 = $gpLayouts[$layout]['name']; + $gplayoutsvar1 = $gpLayouts[$default_layout]['name'] ?? 0; + $gplayoutsvar2 = $gpLayouts[$layout]['name'] ?? 0; $current_theme_name = $layout == 'default' ? $gplayoutsvar1 : $gplayoutsvar2; $is_current_theme = ($current_theme_name == $theme_name); return $is_current_theme; diff --git a/themes/Cajon_Scss/settings.php b/themes/Cajon_Scss/settings.php index e7a5446..c047916 100644 --- a/themes/Cajon_Scss/settings.php +++ b/themes/Cajon_Scss/settings.php @@ -4,4 +4,9 @@ $GP_GETALLGADGETS = true; $link = common::Link('','%s'); gpOutput::Area('header','

'.$link.'

'); gpOutput::Area('link_label','

%s

'); -*/ \ No newline at end of file +*/ + +global $page; +// moved from theme.php - otherwise always present +$page->head_js[] = dirname($page->theme_path) . '/addons/CajonParallax/CajonParallax.js'; +$page->head_js[] = dirname($page->theme_path) . '/addons/CajonParallax/jquery.scrollspeed/jQuery.scrollSpeed.js'; \ No newline at end of file