From b8d932d0500dd120bce4603af67d774ea18d195b Mon Sep 17 00:00:00 2001 From: bergware Date: Sat, 14 Oct 2023 15:46:38 +0200 Subject: [PATCH] Prepare for automatic style sheet loading per page --- emhttp/plugins/dynamix/include/DefaultPageLayout.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/emhttp/plugins/dynamix/include/DefaultPageLayout.php b/emhttp/plugins/dynamix/include/DefaultPageLayout.php index 812c53311..cf3c4418b 100644 --- a/emhttp/plugins/dynamix/include/DefaultPageLayout.php +++ b/emhttp/plugins/dynamix/include/DefaultPageLayout.php @@ -680,6 +680,12 @@ if ($themes2) echo ""; echo ""; foreach ($buttons as $button) { annotate($button['file']); + // include page specific stylesheets (if existing) + $css = "/{$button['root']}/sheets/{$button['name']}"; + $css_stock = "$css.css"; + $css_theme = "$css-$theme.css"; + if (is_file($docroot.$css_stock)) echo '',"\n"; + if (is_file($docroot.$css_theme)) echo '',"\n"; eval('?>'.parse_text($button['text'])); } unset($buttons,$button);