From de500b8b433756b866faefcb7d913d7c0c642352 Mon Sep 17 00:00:00 2001 From: James O'Toole Date: Thu, 27 Jul 2023 09:26:13 -0700 Subject: [PATCH] Prevent sticky lib from loading on user pages --- kraken.theme | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kraken.theme b/kraken.theme index 61b6101..94ecc32 100644 --- a/kraken.theme +++ b/kraken.theme @@ -57,7 +57,10 @@ function kraken_page_attachments_alter(array &$page) $clf_sticky = theme_get_setting('clf_sticky'); if ($clf_sticky) { - $page['#attached']['library'][] = 'kraken/sticky-header'; + //$page['#attached']['library'][] = 'kraken/sticky-header'; + if (\Drupal::routeMatch()->getRouteName() != ('user.login' || 'user.register' || 'user.password')) { + $page['#attached']['library'][] = 'kraken/sticky-header'; + } } }