From e3a3cc5b6d4090d71be277d8399a91c3a8d187b1 Mon Sep 17 00:00:00 2001 From: Edwin Noorlander Date: Mon, 16 Feb 2026 14:39:30 +0100 Subject: [PATCH] Add sidebar toggle button to breadcrumb with open/close functionality Move sidebar toggle from sidebar panel to breadcrumb navigation, positioned left of the HOME icon. Uses distinct icons for open (sidebar-inset) and closed (sidebar) states. Sidebar state persists via sessionStorage. Remove old non-functional toggle buttons from layout and HTMLBlock plugin. --- engine/core/class/CodePressCMS.php | 10 ++++-- engine/templates/layout.mustache | 31 ++++++++++++++++++ plugins/HTMLBlock/HTMLBlock.php | 34 -------------------- public/assets/js/app.js | 51 ++++++++++++++++++++++++++++++ 4 files changed, 89 insertions(+), 37 deletions(-) diff --git a/engine/core/class/CodePressCMS.php b/engine/core/class/CodePressCMS.php index c2b73e7..c448faf 100644 --- a/engine/core/class/CodePressCMS.php +++ b/engine/core/class/CodePressCMS.php @@ -1167,8 +1167,11 @@ private function getGuidePage() { * @return string Breadcrumb HTML */ public function generateBreadcrumb() { + // Sidebar toggle button (shown before home icon in breadcrumb) + $sidebarToggle = ''; + if (isset($_GET['search'])) { - return ''; + return ''; } $page = $_GET['page'] ?? $this->config['default_page']; @@ -1176,12 +1179,13 @@ private function getGuidePage() { $page = preg_replace('/\.[^.]+$/', '', $page); if ($page === $this->config['default_page']) { - return ''; + return ''; } $breadcrumb = '